Queries the details of elasticity assurances.

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 DescribeElasticityAssurances

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

RegionId String Yes cn-hangzhou

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

ResourceGroupId String No rg-bp67acfmxazb4p****

The ID of the resource group to which the elasticity assurance belongs. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.

Note Resources in the default resource group are displayed in the response regardless of how this parameter is set.
Tag.N.Key String No TestKey

The key of tag N of the elasticity assurance. Valid values of N: 1 to 20.

If a single tag is specified to query resources, up to 1,000 resources that have this tag added can be displayed in the response. If multiple tags are specified to query resources, up to 1,000 resources that have all these tags added can be displayed in the response. To query more than 1,000 resources that have specified tags added, call the ListTagResources operation.

Tag.N.Value String No TestValue

The value of tag N of the elasticity assurance. Valid values of N: 1 to 20.

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.Ids String No ["eap-bp67acfmxazb4****", "eap-bp67acfmxazb5****"]

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

Platform String No null
Note This parameter is deprecated.
InstanceType String No ecs.c6.large

The instance type.

ZoneId String No cn-hangzhou-h

The zone ID of the elasticity assurance.

InstanceChargeType String No PostPaid

The billing method of the instances to be created by using the elasticity assurance. Set the value to PostPaid. Only pay-as-you-go instances can be created by using elasticity assurances.

Default value: PostPaid.

Status String No Active

The state of the elasticity assurance. Valid values:

  • All: All states.
  • Preparing: The elasticity assurance is being prepared.
  • Prepared: The elasticity assurance is to take effect.
  • Active: The elasticity assurance is in effect.
  • Released: The elasticity assurance is released.

Default value: Active.

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 1

The total number of entries returned.

MaxResults Integer 10

The number of entries returned per page.

ElasticityAssuranceSet Array of ElasticityAssuranceItem

Details about the elasticity assurances.

ElasticityAssuranceItem
Status String Active

The state of the elasticity assurance. Valid values:

  • Preparing: The elasticity assurance is being prepared.
  • Prepared: The elasticity assurance is to take effect.
  • Active: The elasticity assurance is in effect.
  • Released: The elasticity assurance is released.
PrivatePoolOptionsMatchCriteria String Target

The type of the private pool associated with the elasticity assurance. Valid values:

  • Open: open private pool
  • Target: targeted private pool
PrivatePoolOptionsId String eap-bp1ir35kqtn8ywci****

The ID of the elasticity assurance.

UsedAssuranceTimes Integer 0
Note This parameter is unavailable.
LatestStartTime String null
Note This parameter is unavailable.
PrivatePoolOptionsName String eapTestName

The name of the elasticity assurance.

RegionId String cn-hangzhou

The region ID of the elasticity assurance.

EndTime String 2021-12-03T16:00Z

The time when the elasticity assurance expires.

StartTime String 2020-12-03T05:25Z

The time when the elasticity assurance takes effect.

Description String This is description.

The description of the elasticity assurance.

ResourceGroupId String rg-bp67acfmxazb4p****

The ID of the resource group to which the elasticity assurance belongs.

TotalAssuranceTimes String Unlimited

The total number of times that the elasticity assurance has been applied.

AllocatedResources Array of AllocatedResource

Details about the allocated resources.

AllocatedResource
UsedAmount Integer 2

The number of instances that have used the elasticity assurance.

TotalAmount Integer 2

The total number of instances for which capacity of an instance type is reserved.

zoneId String cn-hangzhou-h

The zone ID.

InstanceType String ecs.c6.large

The instance type.

Tags Array of Tag

The tags of the elasticity assurance.

Tag
TagValue String TestValue

The tag value of the elasticity assurance.

TagKey String TestKey

The tag key of the elasticity assurance.

InstanceChargeType String PostPaid

The billing method of the instances to be created by using the elasticity assurance. Set the value to PostPaid. Only pay-as-you-go instances can be created by using elasticity assurances.

StartTimeType String Now

Indicates when the elasticity assurance takes effect. Valid values:

  • Now: The elasticity assurance takes effect as soon as it is created.
  • Later: The elasticity assurance takes effect at the specified time.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeElasticityAssurances
&RegionId=cn-hangzhou
&PrivatePoolOptions.Ids=["eap-bp1ir35kqtn8ywci****", "eap-bp67acfmxazb5****"]
&InstanceType=ecs.c6.large
&<Common request parameters>

Sample success responses

XML format

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

<DescribeElasticityAssurancesResponse>
    <ElasticityAssuranceSet>
        <ElasticityAssuranceItem>
            <Status>Active</Status>
            <UsedAssuranceTimes>0</UsedAssuranceTimes>
            <Description>This is description.</Description>
            <EndTime>2021-12-03T16:00Z</EndTime>
            <ResourceGroupId>rg-bp67acfmxazb4p****</ResourceGroupId>
            <PrivatePoolOptionsName>eapTestName</PrivatePoolOptionsName>
            <LatestStartTime/>
            <InstanceChargeType>PostPaid</InstanceChargeType>
            <StartTime>2020-12-03T05:25Z</StartTime>
            <StartTimeType>Now</StartTimeType>
            <PrivatePoolOptionsMatchCriteria>Target</PrivatePoolOptionsMatchCriteria>
            <AllocatedResources>
                <AllocatedResource>
                    <UsedAmount>2</UsedAmount>
                    <zoneId>cn-hangzhou-h</zoneId>
                    <TotalAmount>2</TotalAmount>
                    <InstanceType>ecs.c6.large</InstanceType>
                </AllocatedResource>
            </AllocatedResources>
            <PrivatePoolOptionsId>eap-bp1ir35kqtn8ywci****</PrivatePoolOptionsId>
            <TotalAssuranceTimes>Unlimited</TotalAssuranceTimes>
            <RegionId>cn-hangzhou</RegionId>
            <Tags>
                <Tag>
                    <TagKey>TestKey</TagKey>
                    <TagValue>TestValue</TagValue>
                </Tag>
            </Tags>
        </ElasticityAssuranceItem>
    </ElasticityAssuranceSet>
    <TotalCount>1</TotalCount>
    <NextToken>caeba0bbb2be03f84eb48b699f0a4883</NextToken>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
    <MaxResults>10</MaxResults>
</DescribeElasticityAssurancesResponse>

JSON format

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

{
  "ElasticityAssuranceSet" : {
    "ElasticityAssuranceItem" : [ {
      "Status" : "Active",
      "UsedAssuranceTimes" : 0,
      "Description" : "This is description.",
      "EndTime" : "2021-12-03T16:00Z",
      "ResourceGroupId" : "rg-bp67acfmxazb4p****",
      "PrivatePoolOptionsName" : "eapTestName",
      "LatestStartTime" : "",
      "InstanceChargeType" : "PostPaid",
      "StartTime" : "2020-12-03T05:25Z",
      "StartTimeType" : "Now",
      "PrivatePoolOptionsMatchCriteria" : "Target",
      "AllocatedResources" : {
        "AllocatedResource" : [ {
          "UsedAmount" : 2,
          "zoneId" : "cn-hangzhou-h",
          "TotalAmount" : 2,
          "InstanceType" : "ecs.c6.large"
        } ]
      },
      "PrivatePoolOptionsId" : "eap-bp1ir35kqtn8ywci****",
      "TotalAssuranceTimes" : "Unlimited",
      "RegionId" : "cn-hangzhou",
      "Tags" : {
        "Tag" : [ {
          "TagKey" : "TestKey",
          "TagValue" : "TestValue"
        } ]
      }
    } ]
  },
  "TotalCount" : 1,
  "NextToken" : "caeba0bbb2be03f84eb48b699f0a4883",
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "MaxResults" : 10
}

Error codes

HTTP status code 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.Ids 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 private pool cannot be used to create instances that use the specified billing method.
400 Invalid.ZoneId The ZoneId does not match the PrivatePool. The error message returned because the zone does not match the 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 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 elasticity assurance 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 and 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. If the error persists, submit a ticket.

For a list of error codes, visit the API Error Center.