Queries the instances that match a capacity reservation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeCapacityReservationInstances | The operation that you want to perform. Set the value to DescribeCapacityReservationInstances. |
RegionId | String | Yes | cn-hangzhou | The ID of the region in which to create the capacity reservation. You can call the DescribeRegions operation to query the most recent region list. |
MaxResults | Integer | No | 10 | The maximum number of entries to return on each page. Maximum value: 100. Default value: 10. |
NextToken | String | No | caeba0bbb2be03f84eb48b699f0a4883 | The token used to start the next query. Set the value to the NextToken value obtained from the response to the previous request. |
PrivatePoolOptions.Id | String | Yes | crp-bp67acfmxazb4**** | The ID of the capacity reservation. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
NextToken | String | caeba0bbb2be03f84eb48b699f0a4883 | The token used to start the next query. |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E | The ID of the request. |
TotalCount | Integer | 10 | The total number of entries returned. |
MaxResults | Integer | 10 | The maximum number of entries returned per page. |
CapacityReservationItem | Array of InstanceIdSet | Details about the instances that were created by using the capacity reservation. | |
InstanceIdSet | |||
InstanceId | String | i-bp67acfmxazb4**** | The ID of the instance. |
Examples
Sample requests
http(s)://ecs.aliyuncs.com/?Action=DescribeCapacityReservationInstances
&RegionId=cn-hangzhou
&PrivatePoolOptions.Id=crp-bp67acfmxazb4****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeCapacityReservationInstancesResponse>
<TotalCount>2</TotalCount>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
<NextToken>caeba0bbb2be03f84eb48b699f0a4883</NextToken>
<MaxResults>10</MaxResults>
<CapacityReservationItem>
<InstanceIdSet>
<InstanceId>i-bp67acfmxazb4****</InstanceId>
</InstanceIdSet>
<InstanceIdSet>
<InstanceId>i-bp67acfmxazb5****</InstanceId>
</InstanceIdSet>
</CapacityReservationItem>
</DescribeCapacityReservationInstancesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 2,
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"NextToken" : "caeba0bbb2be03f84eb48b699f0a4883",
"MaxResults" : 10,
"CapacityReservationItem" : {
"InstanceIdSet" : [ {
"InstanceId" : "i-bp67acfmxazb4****"
}, {
"InstanceId" : "i-bp67acfmxazb5****"
} ]
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter.RegionId | The specified RegionId should not be null. | The error message returned because the required RegionId parameter is not specified. |
400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | The error message returned because private pools cannot be used to create instances on dedicated hosts. |
400 | SpotNotSupported | Spot is not supported for PrivatePool. | The error message returned because private pools cannot be used to create preemptible instances. |
400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | The error message returned because private pools cannot be used to create instances of the classic network type. |
400 | Invalid.InstanceId | Instance does not exist. | The error message returned because the specified instance does not exist. |
400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | The error message returned because the operation is not supported while the PrivatePoolOptions.MatchCriteria parameter is set to Target. |
400 | MissingParameter.PrivatePoolOptions.Id | The specified PrivatePoolOptions.Id should not be null. | The error message returned because the PrivatePoolOptions.Id parameter is not specified. |
400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | The error message returned because the private pool does not exist. |
400 | Invalid.InstanceType | The InstanceType does not match the PrivatePool. | The error message returned because the specified instance type does not match the specified private pool. |
400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | The error message returned because the specified billing method of the specified instance does not match the specified private pool. |
400 | Invalid.ZoneId | The ZoneId does not match the PrivatePool. | The error message returned because the specified zone does not match the specified private pool. |
400 | Invalid.PrivatePoolOptions.MatchCriteria | The PrivatePoolOptions.MatchCriteria does not match the PrivatePool. | The error message returned because the specified PrivatePoolOptions.MatchCriteria parameter does not match the private pool. |
400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | The error message returned because the specified Platform parameter does not match the private pool. |
400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | The error message returned because the specified 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 error message returned because the instance does not match the private pool. |
400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | The error message returned because the number of specified private pools exceeds the upper limit. |
400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | The error message returned because the number of specified zone IDs exceeds the upper limit. |
400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | The error message returned because the number of specified instance types exceeds the upper limit. |
400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | The error message returned because multiple private pools are created but not paid. |
400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | The error message returned because the InstanceCpuCoreCount and InstanceAmount parameters cannot be specified at the same time. |
400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | The error message returned because the private pool is already paid. |
400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | The error message returned because the specified AssuranceTimes parameter is invalid. |
400 | RepeatStartPrivatePool | PrivatePool has already been started. | The error message returned because the private pool is already started. |
500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | The error message returned because an internal error has occurred. Try again later. |
For a list of error codes, see Service error codes.