Updates the name of a specified instance.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesUpdateInstanceName

The operation that you want to perform. Set the value to UpdateInstanceName.

InstanceIdStringYesamqp-cn-zvp2ajsj****

The ID of the instance.

InstanceNameStringYesamqp-cn-ZVp2ajsj****

The new name of the instance.

RegionIdStringYescn-hangzhou

The ID of the region where the instance is deployed.

Response parameters

ParameterTypeExampleDescription
CodeInteger200

The HTTP status code.

DataStringtrue

The returned message that indicates whether the request is successful.

RequestIdString6DC68EC9-0E76-5435-B8C0-FF9492B4****

The ID of the request.

MessageStringInstanceNotExist

The error message that is returned when an error occurs during execution.

SuccessBooleantrue

The returned message that indicates whether the request is successful.

Examples

Sample requests

http(s)://amqp-open.cn-hangzhou.aliyuncs.com/?Action=UpdateInstanceName
&InstanceId=amqp-cn-zvp2ajsj****
&InstanceName=amqp-cn-ZVp2ajsj****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<UpdateInstanceName>
      <RequestId>6DC68EC9-0E76-5435-B8C0-FF9492B4****</RequestId>
      <Data>true</Data>
      <Code>200</Code>
      <Success>true</Success>
</UpdateInstanceName>

JSON format

{
    "RequestId": "6DC68EC9-0E76-5435-B8C0-FF9492B4****",
    "Data": true,
    "Code": 200,
    "Success": true
}

Error codes

HttpCodeError codeError messageDescription
500InternalErrorThe request processing has failed due to some unknown error.The error message returned because the request fails to be processed due to an unknown error.

For a list of error codes, visit the API Error Center.