Modifies the attributes of a reserved instance, such as its name and description.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | ModifyReservedInstanceAttribute | The operation that you want to perform. Set the value to ModifyReservedInstanceAttribute. |
RegionId | String | Yes | cn-hangzhou | The region ID of the reserved instance. |
ReservedInstanceId | String | Yes | ecsri-uf61hdhue4kcorqsk**** | The ID of the reserved instance. |
ReservedInstanceName | String | No | testReservedInstanceName | The new name of the reserved instance. The name must be 2 to 128 characters in length. The name must start with a letter but cannot start with |
Description | String | No | ri-example | The new description of the reserved instance. The description must be 2 to 256 characters in length and cannot start with This parameter is left empty by default. |
Response parameters
Parameter |
Type |
Example |
Description |
HttpStatusCode | Integer | 200 | The HTTP status code. |
Code | String | 200 | The error code. |
Message | String | Success | The error message for the instance operation. The return value Success indicates that this operation is successful. For more information, see the "Error codes" section in this topic. |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** | The ID of the request. |
Examples
Sample requests
http(s)://ecs.aliyuncs.com/?Action=ModifyReservedInstanceAttribute
&RegionId=cn-hangzhou
&ReservedInstanceId=ecsri-uf61hdhue4kcorqsk****
&ReservedInstanceName=testReservedInstanceName
&Description=ri-example
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyReservedInstanceAttributeResponse>
<HttpStatusCode>200</HttpStatusCode>
<Code>200</Code>
<Message>Success</Message>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</ModifyReservedInstanceAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"HttpStatusCode" : 200,
"Code" : "200",
"Message" : "Success",
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
HTTP status code |
Error code |
Error message |
Description |
403 | InvalidParameter.ReservedInstanceName | The reservedInstanceName is invalid. | Invalid ReservedInstanceName value. |
500 | InternalError | The request processing has failed due to some unknown error. | An internal error occurred. Try again later. |
For a list of error codes, see Service error codes.