Modifies the information of a capacity reservation, including the name, description, release mode, and the total number of Elastic Compute Service (ECS) instances for which capacity is reserved.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | 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 and cannot start with |
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 time of the capacity reservation. Note You can change the effective time of only capacity reservations that are in the Preparing state. Specify the effective time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. If the value of mm is not 00, the value is ignored. The same holds true for ss. |
EndTime | String | No | 2021-10-30T06:32:00Z | The expiration time of the capacity reservation. This parameter takes effect only when |
EndTimeType | String | No | Unlimited | The release mode of the capacity reservation. Valid values:
|
Platform | String | No | Linux | The operating system type. Valid values:
Note This parameter is unavailable. |
InstanceAmount | Integer | No | 100 | The total number of instances for which capacity is reserved. Valid values: the number of created instances to 1000. Note When you increase the number of instances, the increase may fail due to insufficient resources. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 8455DD10-84F8-43C9-8365-5F448EB169B6 | The request ID. |
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
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyCapacityReservationResponse>
<RequestId>8455DD10-84F8-43C9-8365-5F448EB169B6</RequestId>
</ModifyCapacityReservationResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "8455DD10-84F8-43C9-8365-5F448EB169B6"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
401 | InvalidUser.Unauthorized | The user is not authorized | You are not authorized to perform this operation. |
403 | IncorrectPrivatePoolStatus | The current status of the private pool does not support this operation. | The specified private pool state does not support the 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 requested resources are unavailable in the specified zone. Try another instance type or zone. You can call the DescribeZones operation to query available resources. |
For a list of error codes, see Service error codes.