All Products
Search
Document Center

Elastic Compute Service:ReleaseCapacityReservation

Last Updated:Mar 19, 2024

Releases a capacity reservation.

Operation description

If the release mode of a capacity reservation that takes effect immediately 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.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
PrivatePoolOptions.IdstringYes

The ID of the capacity reservation.

crp-bp67acfmxazb4****
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Set the value to false. This indicates that the system directly releases the capacity reservation.

false

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter.RegionIdThe specified RegionId should not be null.The RegionId parameter is required.
400InvalidParameter.NameThe specified PrivatePoolOptions.Name is invalid.-
400InvalidParameter.PrivatePoolOptions.IdsThe specified PrivatePoolOptions.Ids is invalid.-
400DedicatedHostNotSupportedDedicatedHost is not supported for PrivatePool.The private pool does not support dedicated hosts.
400SpotNotSupportedSpot is not supported for PrivatePool.The private pool does not support preemptible instances.
400ClassicNetworkNotSupportedClassic network is not supported for PrivatePool.The private pool does not support instances in the classic network.
400Invalid.InstanceIdInstance does not exist.The specified instance does not exist.
400Invalid.PrivatePoolOptions.MatchCriteriaTarget mode does not support this operation.The operation is not supported while the PrivatePoolOptions.MatchCriteria parameter is set to Target.
400MissingParameter.PrivatePoolOptions.IdThe specified PrivatePoolOptions.Id should not be null.The PrivatePoolOptions.Id parameter is required.
400Invalid.PrivatePoolOptions.IdThe PrivatePool does not exist.The private pool does not exist.
400Invalid.InstanceTypeThe InstanceType does not match the PrivatePool.The instance type and the private pool do not match.
400Invalid.InstanceChargeTypeThe InstanceChargeType does not match the PrivatePool.The instance billing method and the private pool do not match.
400Invalid.ZoneIdThe ZoneId does not match the PrivatePool.The zone and the private pool do not match.
400Invalid.PrivatePoolOptions.statusThe PrivatePool has been used up.-
400Invalid.PrivatePoolOptions.MatchCriteriaThe PrivatePoolOptions.MatchCriteria does not match the PrivatePool.The specified PrivatePoolOptions.MatchCriteria parameter does not match the private pool.
400InvalidPlatform.ValueNotSupportedThe Platform does not match the PrivatePool.The specified Platform parameter does not match the private pool.
400Invalid.PrivatePoolOptions.statusThe PrivatePool is expired or inactive.-
400Invalid.PrivatePoolOptions.statusThe PrivatePool status is not valid.-
400Invalid.PrivatePoolOptions.statusThe Instance should be created within 48 hours once the PrivatePool is started.-
400InvalidAliUidThe PrivatePool does not belong to the user of the Instance.The specified private pool does not belong to the user who attempted to create the instance.
400Invalid.InstanceIdThe Instance dose not attached to a PrivatePool.The instance and the private pool do not match.
400MissingParameter.PackageTypeThe specified parameter "PackageType" can not be empty.-
400MissingParameter.PrivatePoolOptions.IdsThe specified parameter "PrivatePoolOptions.Ids" can not be empty.-
400MissingParameter.PrivatePoolOptions.IdThe specified parameter "PrivatePoolOptions.Id" can not be empty.-
400MissingParameter.InstanceCpuCoreCountThe specified parameter "InstanceCpuCoreCount" can not be empty.-
400MissingParameter.InstanceAmountThe specified parameter "InstanceAmount" can not be empty.-
400MissingParameter.InstanceCpuCoreCountOrInstanceAmountThe specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time.-
400Invalid.TooManyPrivatePoolOptions.IdsToo many PrivatePoolOptions.Ids in this request.The number of specified private pool IDs exceeds the upper limit.
400Invalid.TooManyZoneIdsToo many ZoneIds in the request.The number of specified zone IDs exceeds the upper limit.
400Invalid.TooManyInstanceTypesToo many InstanceTypes in the request.The number of specified instance types exceeds the upper limit.
400Invalid.TooManyUnpaidPrivatePoolToo many PrivatePools create but still unpaid.Multiple private pools are created but not paid.
400Invalid.InstanceCpuCoreCountOrInstanceAmountBoth InstanceCpuCoreCount and InstanceAmount are provided.The InstanceCpuCoreCount and InstanceAmount parameters cannot be both specified.
400Invalid.PrivatePoolOptions.IdsThe specified parameter "PrivatePoolOptions.Ids" exist invalid element Id.-
400Invalid.PackageTypeThe specified parameter "PackageType" is invalid.-
400Invalid.PrivatePool.PurchaseThe PrivatePool has already paid.The private pool is already paid.
400Invalid.AssuranceTimes.NotSupportedThe value of AssuranceTimes is not supported.The specified AssuranceTimes parameter is invalid.
400Invalid.TooManyInstanceTypesThe specified parameter "InstanceType" should only has one item.-
400Invalid.PrivatePoolOptions.MatchCriteriaThe specified parameter "PrivatePoolOptions.MatchCriteria" is invalid.-
400RepeatStartPrivatePoolPrivatePool has already been started.The private pool is already started.
400Invalid.PrivatePoolOptions.IdThe specified parameter "PrivatePoolOptions.Id" should be empty.-
400Invalid.InstanceIdModify DedicatedHost Instance's attachment attributes is not supported.-
400Invalid.InstanceIdModify Spot Instance's attachment attributes is not supported.-
400Invalid.InstanceIdModify Classic Network Instance's attachment attributes is not supported.-
400Invalid.Action.ReleaseCapacityReservationRelease action is not supported when using Limited endTimeType, please change it to Unlimited first.-
400Invalid.PrivatePoolOptions.IdThe specified PrivatePoolOptions.Id is not supported for the action.-
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred. Try again later.

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 400 change
    delete Error Codes: 500