Queries information of the private pools that Elastic Compute Service (ECS) instances match.

Description

A private pool is generated after an elasticity assurance or a capacity reservation is created. The private pool is associated with information about the instances that are created by using the private pool. You can configure a private pool when you create an ECS instance. The instance can match the corresponding elasticity assurance or capacity reservation.

When a private pool expires, data about the association between instances and the private pool becomes invalid. If you call this operation to query the private pool information, no value is returned.

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 DescribeInstanceAttachmentAttributes

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

RegionId String Yes cn-hangzhou

The region ID of the elasticity assurance. You can call the DescribeRegions operation to query the current list of regions.

InstanceIds String Yes ["i-bp67acfmxazb4****", "i-bp67acfmxazb5****", "i-bp67acfmxazb6****"]

The IDs of instances. The value can be a JSON array that consists of up to 100 instance IDs. Separate the IDs with commas (,).

PageNumber Integer No 1

The number of the page to return.

Pages start from page 1.

Default value: 1.

PageSize Integer No 10

The number of entries to return on each page.

Maximum value: 100.

Default value: 10.

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned per page.

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

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

TotalCount Integer 1

The total number of entries returned.

Instances Array of Instance

Details about the association between the private pool and the instances.

Instance
InstanceId String i-bp67acfmxazb4****

The ID of the instance.

PrivatePoolOptionsMatchCriteria String Open

The match mode of the private pool. Valid values:

  • Open: open private pool. Instances automatically match an open private pool.
  • Target: specified private pool. Instances match a specified private pool.
  • None: no private pool. Instances do not use private pools.
PrivatePoolOptionsId String eap-bp67acfmxazb4****

The ID of the private pool. When the value of PrivatePoolOptionsMatchCriteria is Open, the private pool ID is the ID of the private pool that was automatically matched and allocated by the system.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeInstanceAttachmentAttributes
&RegionId=cn-hangzhou
&InstanceIds=["i-bp67acfmxazb4****", "i-bp67acfmxazb5****", "i-bp67acfmxazb6****"]
&<Common request parameters>

Sample success responses

XML format

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

<DescribeInstanceAttachmentAttributesResponse>
    <Instances>
        <Instance>
            <InstanceId>i-bp67acfmxazb4****</InstanceId>
            <PrivatePoolOptionsMatchCriteria>Open</PrivatePoolOptionsMatchCriteria>
            <PrivatePoolOptionsId>eap-bp67acfmxazb4****</PrivatePoolOptionsId>
        </Instance>
    </Instances>
    <TotalCount>1</TotalCount>
    <RequestId>395245CB-A6FD-4777-8F83-A0B0DFE43F23</RequestId>
    <PageSize>10</PageSize>
    <PageNumber>1</PageNumber>
</DescribeInstanceAttachmentAttributesResponse>

JSON format

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

{
  "Instances" : {
    "Instance" : [ {
      "InstanceId" : "i-bp67acfmxazb4****",
      "PrivatePoolOptionsMatchCriteria" : "Open",
      "PrivatePoolOptionsId" : "eap-bp67acfmxazb4****"
    } ]
  },
  "TotalCount" : 1,
  "RequestId" : "395245CB-A6FD-4777-8F83-A0B0DFE43F23",
  "PageSize" : 10,
  "PageNumber" : 1
}

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 in the classic network.
400 Invalid.InstanceId Instance does not exist. The error message returned because the instance does not exist.
400 Invalid.PrivatePoolOptions.MatchCriteria Target mode does not support this operation. The error message returned because targeted private pools do not support the operation.
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 instance type does not match the private pool.
400 Invalid.InstanceChargeType The InstanceChargeType does not match the PrivatePool. The error message returned because the specified billing method of the 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 pool IDs 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.
404 InvalidInstanceIds.NotFound The specified InstanceIds does not exist. The error message returned because the specified instance ID does not exist. Check whether the specified instance ID is valid. You can call the DescribeInstances operation to query the states of specific instances.

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