You can call this operation to modify some information of a capacity reservation, such as its name, description, release mode, and total number of reserved instances.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | ModifyCapacityReservation |
The operation that you want to perform. Set the value to ModifyCapacityReservation. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the capacity reservation. You can call the DescribeRegions operation to query the most recent region list. |
PrivatePoolOptions.Id | String | Yes | crp-bp67acfmxazb4**** |
The ID of the capacity reservation. |
PrivatePoolOptions.Name | String | No | eapTestName |
The name of the capacity reservation. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-). |
Description | String | No | This is description. |
The description of the capacity reservation. The description must be 2 to 256 characters
in length and cannot start with |
StartTime | String | No | Now |
The effective mode of the capacity reservation. The capacity reservation can be set only to take effect immediately. You do not need to pass in a value for the parameter. Note The capacity reservation takes effect immediately when this parameter is left empty.
|
EndTimeType | String | No | Unlimited |
The release mode of the capacity reservation. Valid values:
|
EndTime | String | No | 2021-10-30T06:32:00Z |
The expiration time of the capacity reservation. This parameter takes effect only
when |
Platform | String | No | Linux |
The operating system type of the instance reserved. Valid values:
Note This parameter is unavailable.
|
InstanceAmount | Integer | No | 100 |
The total number of instances reserved by the capacity reservation. Valid values: the number of created instances to 1000. Note When you increase the number of instances reserved, the increase may fail due to insufficient
resources.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 8455DD10-84F8-43C9-8365-5F448EB169B6 |
The ID of the request. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=ModifyCapacityReservation
&PrivatePoolOptions.Id=crp-bp67acfmxazb4****
&RegionId=cn-hangzhou
&PrivatePoolOptions.Name=eapTestName
&Description=This is description.
&<Common request parameters>
Sample success responses
XML
format
<ModifyCapacityReservationResponse>
<RequestId>8455DD10-84F8-43C9-8365-5F448EB169B6</RequestId>
</ModifyCapacityReservationResponse>
JSON
format
{
"RequestId": "8455DD10-84F8-43C9-8365-5F448EB169B6"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
401 | InvalidUser.Unauthorized | The user is not authorized | The error message returned because you are not authorized to perform this operation. |
403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | The error message returned because resources are insufficient in the specified zone. Try other types of resources, or select other regions and zones. |
For a list of error codes, visit the API Error Center.