All Products
Search
Document Center

Elastic Compute Service:DescribeElasticityAssurances

Last Updated:Sep 20, 2026

Queries the details of an elasticity assurance. For example, you can query the status, match mode, effective mode, expiration time, and number of used instances of an elasticity assurance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeElasticityAssurances

get

*ElasticityAssurance

acs:ecs:{#regionId}:{#accountId}:elasticityassurance/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

ResourceGroupId

string

No

The ID of the resource group. When you use this parameter to filter resources, the resource count cannot exceed 1,000.

Note

Filtering by the default resource group is not supported.

rg-bp67acfmxazb4p****

Tag

array<object>

No

The list of tag key-value pairs bound to the elasticity assurance.

object

No

The tag information.

Key

string

No

The tag key. N indicates that you can set multiple tag keys for filtering. Valid values of N: 1 to 20.

If you use a single tag to filter resources, the resource count with this tag cannot exceed 1,000. If you use multiple tags to filter resources, the resource count of resources that have all specified tags attached cannot exceed 1,000. If the resource count exceeds 1,000, call the ListTagResources operation to query resources.

TestKey

Value

string

No

The tag value. N indicates that you can specify multiple tag keys for filtering. Valid values of N: 1 to 20.

TestValue

MaxResults

integer

No

The maximum number of entries per page for a paged query.

Maximum value: 100.

Default value: 10.

10

NextToken

string

No

The pagination token for the elasticity assurance query. Obtain the value from the result of the previous request.

caeba0bbb2be03f84eb48b699f0a4883

PrivatePoolOptions.Ids

string

No

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

["eap-bp67acfmxazb4****", "eap-bp67acfmxazb5****"]

Platform

string

No

Note

This parameter is deprecated.

null

InstanceType

string

No

The instance type. You can use the instance type to query only active elasticity assurances. Released elasticity assurances can be queried only by using PrivatePoolOptions.Ids.

ecs.c6.large

ZoneId

string

No

The zone ID in the region to which the elasticity assurance belongs.

cn-hangzhou-h

InstanceChargeType

string

No

The billing method of the instance. Valid values: PostPaid. Only pay-as-you-go is supported.

Default value: PostPaid.

PostPaid

Status

string

No

The status of the elasticity assurance. Valid values:

  • All: all states.

  • Deactived: to be activated. This state is in invitational preview.

  • Preparing: being prepared.

  • Prepared: to take effect.

  • Active: in effect.

  • Released: released.

If you do not specify this parameter, elasticity assurances in all states except Pending and Released are queried.

Active

PackageType

string

No

The type of the elasticity assurance. Valid values:

  • ElasticityAssurance: standard elasticity assurance. This is the type when RecurrenceRules is not specified.

  • TimeDivisionElasticityAssurance: time-division elasticity assurance. This is the type when RecurrenceRules is specified.

ElasticityAssurance

Response elements

Element

Type

Description

Example

object

NextToken

string

The pagination token for the next query.

caeba0bbb2be03f84eb48b699f0a4883

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

The total number of entries that match the query conditions.

1

MaxResults

integer

The maximum number of entries per page for the elasticity assurance.

10

ElasticityAssuranceSet

object

ElasticityAssuranceItem

array<object>

The collection of elasticity assurance details.

array<object>

The details of the elasticity assurance.

Status

string

The status of the elasticity assurance. Valid values:

  • Preparing: being prepared.

  • Prepared: to take effect.

  • Active: in effect.

  • Released: released.

Active

PrivatePoolOptionsMatchCriteria

string

The match mode of the elasticity assurance. Valid values:

  • Open: open mode. The system automatically matches the capacity of open private pools when instances are started. If no matching private pool capacity is available, public pool resources are used to start instances.

  • Target: targeted mode. Instances are started by using the capacity of the specified private pool. If the specified private pool capacity is unavailable, the instances fail to start.

Target

PrivatePoolOptionsId

string

The ID of the elasticity assurance.

eap-bp1ir35kqtn8ywci****

UsedAssuranceTimes

integer

Note

This parameter is not publicly available.

0

LatestStartTime

string

Note

This parameter is not publicly available.

null

PrivatePoolOptionsName

string

The service name of the elasticity assurance.

eapTestName

RegionId

string

The ID of the region to which the elasticity assurance belongs.

cn-hangzhou

EndTime

string

The expiration time of the elasticity assurance. The time is in ISO 8601 standard in UTC.

2021-12-03T16:00Z

StartTime

string

The effective period of the elasticity assurance. The time is in ISO 8601 format in UTC.

2020-12-03T05:25Z

Description

string

The description of the elasticity assurance.

This is description.

ResourceGroupId

string

The ID of the resource group.

rg-bp67acfmxazb4p****

TotalAssuranceTimes

string

The total number of times that the elasticity assurance is applied. Currently, only the unlimited mode within the effective period is supported.

Unlimited

AllocatedResources

object

AllocatedResource

array<object>

The list of resource allocation details.

array<object>

The resource allocation details.

UsedAmount

integer

The number of used instances.

2

TotalAmount

integer

The total number of instances to be reserved for a single instance type.

2

AvailableAmount

integer

Note

This parameter is not publicly available.

5

FailedAmount

integer

The failed capacity.

1

LockedAmount

integer

The locked capacity.

1

zoneId

string

The zone ID in the region to which the elasticity assurance belongs.

cn-hangzhou-h

InstanceType

string

The instance type.

ecs.c6.large

ElasticityAssuranceUsages

object

ElasticityAssuranceUsage

array<object>

Note

This parameter is not publicly available.

object

Note

This parameter is not publicly available.

AccountId

string

Note

This parameter is not publicly available.

1144775968548340

ServiceName

string

Note

This parameter is not publicly available.

name

UsedAmount

integer

Note

This parameter is not publicly available.

1

Tags

object

Tag

array<object>

The list of tag key-value pairs bound to the elasticity assurance.

object

The tag key-value pair information bound to the elasticity assurance.

TagValue

string

The tag value.

TestValue

TagKey

string

The tag key.

TestKey

InstanceChargeType

string

The billing method of the instance. Currently, only pay-as-you-go is supported.

Valid values: PostPaid.

PostPaid

StartTimeType

string

The effective mode of the elasticity assurance. Valid values:

  • Now: takes effect immediately.

  • Later: takes effect at a specified time.

Now

ElasticityAssuranceOwnerId

string

Note

This parameter is not publicly available.

e114477596854834

RecurrenceRules

object

RecurrenceRule

array<object>

The list of recurrence rules for the time-division elasticity assurance.

object

The recurrence rule for the time-division elasticity assurance.

RecurrenceType

string

The policy type of the recurrence rule. Valid values:

  • Daily: daily recurrence.

  • Weekly: weekly recurrence.

  • Monthly: monthly recurrence.

Daily

RecurrenceValue

string

The value of the recurrence rule. Valid values:

  • If RecurrenceType is set to Daily, only one value can be specified. Valid values: 1 to 31. The value indicates the interval in days.

  • If RecurrenceType is set to Weekly, multiple values can be specified and separated with commas (,). The values for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday are 0, 1, 2, 3, 4, 5, and 6. For example, 1,2 indicates Monday and Tuesday.

  • If RecurrenceType is set to Monthly, the format is A-B. Valid values of A and B: 1 to 31. B must be greater than or equal to A. For example, 1-5 indicates the 1st to 5th day of each month.

1

StartHour

integer

The effective period of the time-division assurance.

4

EndHour

integer

The end time of the time-division assurance.

10

PackageType

string

The type of the elasticity assurance. Valid values:

  • ElasticityAssurance: standard elasticity assurance.

  • TimeDivisionElasticityAssurance: time-division elasticity assurance.

ElasticityAssurance

Examples

Success response

JSON format

{
  "NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TotalCount": 1,
  "MaxResults": 10,
  "ElasticityAssuranceSet": {
    "ElasticityAssuranceItem": [
      {
        "Status": "Active",
        "PrivatePoolOptionsMatchCriteria": "Target",
        "PrivatePoolOptionsId": "eap-bp1ir35kqtn8ywci****",
        "UsedAssuranceTimes": 0,
        "LatestStartTime": "null",
        "PrivatePoolOptionsName": "eapTestName",
        "RegionId": "cn-hangzhou",
        "EndTime": "2021-12-03T16:00Z",
        "StartTime": "2020-12-03T05:25Z",
        "Description": "This is description.",
        "ResourceGroupId": "rg-bp67acfmxazb4p****",
        "TotalAssuranceTimes": "Unlimited",
        "AllocatedResources": {
          "AllocatedResource": [
            {
              "UsedAmount": 2,
              "TotalAmount": 2,
              "AvailableAmount": 5,
              "FailedAmount": 1,
              "LockedAmount": 1,
              "zoneId": "cn-hangzhou-h",
              "InstanceType": "ecs.c6.large",
              "ElasticityAssuranceUsages": {
                "ElasticityAssuranceUsage": [
                  {
                    "AccountId": "1144775968548340",
                    "ServiceName": "name",
                    "UsedAmount": 1
                  }
                ]
              }
            }
          ]
        },
        "Tags": {
          "Tag": [
            {
              "TagValue": "TestValue",
              "TagKey": "TestKey"
            }
          ]
        },
        "InstanceChargeType": "PostPaid",
        "StartTimeType": "Now",
        "ElasticityAssuranceOwnerId": "e114477596854834",
        "RecurrenceRules": {
          "RecurrenceRule": [
            {
              "RecurrenceType": "Daily",
              "RecurrenceValue": "1",
              "StartHour": 4,
              "EndHour": 10
            }
          ]
        },
        "PackageType": "ElasticityAssurance"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter.RegionId The specified RegionId should not be null. The RegionId parameter is required.
400 InvalidParameter.Name The specified PrivatePoolOptions.Name is invalid.
400 InvalidParameter.PrivatePoolOptions.Ids The specified PrivatePoolOptions.Ids is invalid.
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 spot instances.
400 ClassicNetworkNotSupported Classic network is not supported for PrivatePool. The private pool does not support instances in the classic network.
400 Invalid.InstanceId Instance does not exist. The specified instance does not exist.
400 Invalid.PrivatePoolOptions.MatchCriteria Target mode does not support this operation. 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 PrivatePoolOptions.Id parameter is required.
400 Invalid.PrivatePoolOptions.Id The PrivatePool does not exist. The private pool does not exist.
400 Invalid.InstanceType The InstanceType does not match the PrivatePool. The instance type and the private pool do not match.
400 Invalid.InstanceChargeType The InstanceChargeType does not match the PrivatePool. The instance billing method and the private pool do not match.
400 Invalid.ZoneId The ZoneId does not match the PrivatePool. The zone and the private pool do not match.
400 Invalid.PrivatePoolOptions.status The PrivatePool has been used up. The resource is exhausted.
400 InvalidPlatform.ValueNotSupported The Platform does not match the PrivatePool. The specified Platform parameter does not match the private pool.
400 InvalidAliUid The 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.
400 MissingParameter.PackageType The specified parameter "PackageType" can not be empty. The PackageType parameter cannot be empty.
400 MissingParameter.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" can not be empty. Specifies that the parameter "PrivatePoolOptions.ids" cannot be empty.
400 MissingParameter.InstanceCpuCoreCount The specified parameter "InstanceCpuCoreCount" can not be empty. The specified parameter 'InstanceCpuCocount' cannot be empty.
400 MissingParameter.InstanceAmount The specified parameter "InstanceAmount" can not be empty. The specified parameter InstanceAmount cannot be empty.
400 MissingParameter.InstanceCpuCoreCountOrInstanceAmount The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. The specified parameter InstanceCpuCoreCount and InstanceAmount cannot be both empty.
400 Invalid.TooManyPrivatePoolOptions.Ids Too many PrivatePoolOptions.Ids in this request. The number of specified private pool 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 but not paid.
400 Invalid.InstanceCpuCoreCountOrInstanceAmount Both InstanceCpuCoreCount and InstanceAmount are provided. The InstanceCpuCoreCount and InstanceAmount parameters cannot be both specified.
400 Invalid.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. The specified private pool ID does not exist.
400 Invalid.PackageType The specified parameter "PackageType" is invalid. The specified parameter PackageType is invalid.
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. The specified AssuranceTimes parameter is invalid.
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 has occurred. Try again later.
404 InvalidResourceGroup.NotFound The specified resource group is not found. Cannot find the corresponding resource group

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.