All Products
Search
Document Center

:ReleaseCapacityReservation

更新時間:Dec 18, 2023

Releases a capacity reservation.

Usage notes

If the release mode of an immediate capacity reservation is set to manual release, you can call this operation to release the capacity reservation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes ReleaseCapacityReservation

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

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.

DryRun Boolean No false

Specifies whether to perform only a dry run, without performing the actual request. Set the value to false. false: performs a dry run and performs the actual request.

Response parameters

Parameter

Type

Example

Description

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=ReleaseCapacityReservation
&RegionId=cn-hangzhou
&PrivatePoolOptions.Id=crp-bp67acfmxazb4****
&DryRun=false
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ReleaseCapacityReservationResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</ReleaseCapacityReservationResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter.RegionId The specified RegionId should not be null. RegionId is required.
400 DedicatedHostNotSupported DedicatedHost is not supported for PrivatePool. The private pool does not support dedicated hosts.
400 SpotNotSupported Spot is not supported for PrivatePool. The private pool does not support preemptible instances.
400 ClassicNetworkNotSupported Classic network is not supported for PrivatePool. The private pool does not support instances of the classic network type.
400 Invalid.InstanceId Instance does not exist. The instance is not found.
400 Invalid.PrivatePoolOptions.MatchCriteria Target mode does not support this operation. This operation cannot be performed when PrivatePoolOptions.MatchCriteria is set to Target.
400 MissingParameter.PrivatePoolOptions.Id The specified PrivatePoolOptions.Id should not be null. PrivatePoolOptions.Id is required.
400 Invalid.PrivatePoolOptions.Id The PrivatePool does not exist. The private pool is not found.
400 Invalid.InstanceType The InstanceType does not match the PrivatePool. The specified instance type does not match the private pool.
400 Invalid.InstanceChargeType The InstanceChargeType does not match the PrivatePool. The instance billing method does not match the private pool.
400 Invalid.ZoneId The ZoneId does not match the PrivatePool. The zone does not match the private pool.
400 Invalid.PrivatePoolOptions.MatchCriteria The PrivatePoolOptions.MatchCriteria does not match the PrivatePool. The PrivatePoolOptions.MatchCriteria value does not match the private pool.
400 InvalidPlatform.ValueNotSupported The Platform does not match the PrivatePool. The Platform value does not match the private pool.
400 InvalidAliUid The PrivatePool does not belong to the user of the Instance. The private pool does not belong to the user who attempted to create the instance.
400 Invalid.InstanceId The Instance dose not attached to a PrivatePool. The instance does not match the private pool.
400 Invalid.TooManyPrivatePoolOptions.Ids Too many PrivatePoolOptions.Ids in this request. The number of specified capacity reservation IDs exceeds the upper limit.
400 Invalid.TooManyZoneIds Too many ZoneIds in the request. The number of specified zone IDs exceeds the upper limit.
400 Invalid.TooManyInstanceTypes Too many InstanceTypes in the request. The number of specified instance types exceeds the upper limit.
400 Invalid.TooManyUnpaidPrivatePool Too many PrivatePools create but still unpaid. Multiple private pools are created and not paid.
400 Invalid.InstanceCpuCoreCountOrInstanceAmount Both InstanceCpuCoreCount and InstanceAmount are provided. The InstanceCpuCoreCount and InstanceAmount parameters cannot be both specified.
400 Invalid.PrivatePool.Purchase The PrivatePool has already paid. The private pool is already paid.
400 Invalid.AssuranceTimes.NotSupported The value of AssuranceTimes is not supported. Invalid AssuranceTimes value.
400 RepeatStartPrivatePool PrivatePool has already been started. The private pool is already started.
500 InternalError The request processing has failed due to some unknown error, exception or failure. An internal error occurred. Try again later.

For a list of error codes, see Service error codes.