All Products
Document Center

Elastic Compute Service:ModifyCapacityReservation

Last Updated:May 14, 2024

Modifies the information about a capacity reservation, including the name, description, release mode, and the total number of Elastic Compute Service (ECS) instances for which capacity is reserved.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters


The region ID of the capacity reservation. You can call the DescribeRegions operation to query the most recent region list.


The capacity reservation ID.


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 http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).


The description of the capacity reservation. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.

This is description.

The mode in which the capacity reservation takes effect. Only immediate capacity reservations are supported. You do not need to specify a value for this parameter.

Note If you do not specify a value for this parameter, the capacity reservation immediately takes effect.

The expiration time of the capacity reservation. This parameter takes effect only when EndTimeType is set to Limited. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. For more information, see ISO 8601.


The release mode of the capacity reservation. Valid values:

  • Limited: The capacity reservation is automatically released at the specified point in time. If you configure this parameter, you must also configure EndTime.
  • Unlimited: The capacity reservation must be manually released. You can release it anytime.

The operating system of the image used by the instance. Valid values:

  • Windows
  • Linux
Note This parameter is unavailable.

The total number of instances for which capacity is reserved. Valid values: the number of used instances to 1000.

Note When you increase the number of instances, the increase may fail due to insufficient resources.

Response parameters


The request ID.



Sample success responses


  "RequestId": "8455DD10-84F8-43C9-8365-5F448EB169B6"

Error codes

HTTP status codeError codeError messageDescription
400InvalidInstanceAmount.ValueNotSupportedThe specified parameter InstanceAmount is not valid.-
400InvalidDescription.ValueNotSupportedThe specified Description is invalid.-
400InvalidEndTime.ValueNotSupportedThe specified EndTime is invalid.-
400InvalidStartTime.ValueNotSupportedThe specified StartTime is invalid.-
401InvalidUser.UnauthorizedThe user is not authorizedYou are not authorized to perform this operation.
403IncorrectPrivatePoolStatusThe current status of the private pool does not support this operation.The specified private pool state does not support the operation.
403OperationDenied.NoStockThe requested resource is sold out in the specified zone; try other types of resources or other regions and zones.The requested resources are insufficient.
403InvalidPrivatePoolOptionsName.ValueNotSupportedThe specified PrivatePoolOptions.Name is invalid.-
403InvalidPlatform.ValueNotSupportedThe specified Platform is invalid.-
403OperationDenied.PlatformNotSupportedThe specified private pool does not support this operation.-
403OperationDenied.EndTimeTypeNotSupportedThe specified private pool does not support this operation.-
403OperationDenied.StartTimeNotSupportedThe specified private pool does not support this operation.-
403OperationDenied.InstanceAmountNotSupportedThe specified private pool does not support this operation.-
403InvalidInstanceAmount.ValueNotSupportedThe specified InstanceAmount is invalid.-
403InvalidPrivatePoolOptions.IdThe specified private pool does not support this operation.-
403InvalidPrivatePoolOptions.IdThe specified PrivatePoolOptions.Id is invalid-
404InvalidPrivatePoolId.NotFoundThe specified private pool does not exist.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-06The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 401 change
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404