DescribeElasticityAssurances

更新时间:
复制 MD 格式

Retrieves the details of an Elasticity Assurance, including its status, matching mode, effective method, expiry time, and the number of used instances.

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 where the Elasticity Assurance is located. You can call the DescribeRegions operation to query the latest list of Alibaba Cloud regions.

cn-hangzhou

ResourceGroupId

string

No

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

Note

Filtering by the default resource group is not supported.

rg-bp67acfmxazb4p****

Tag

array<object>

No

The tags used to filter Elasticity Assurances.

object

No

A tag that consists of a key-value pair.

Key

string

No

The tag key. You can specify up to 20 tag keys to filter resources.

The query returns a maximum of 1,000 resources that match the specified tags. If more than 1,000 resources match the tags, call the ListTagResources operation to query all the resources.

TestKey

Value

string

No

The tag value. You can specify up to 20 tag values.

TestValue

MaxResults

integer

No

The maximum number of entries to return on each page.

Maximum value: 100.

Default value: 10.

10

NextToken

string

No

The pagination token that is used in the next request to retrieve a new page of results. You do not need to specify this parameter for the first request. You must specify the token that is obtained from the previous query as the value of NextToken.

caeba0bbb2be03f84eb48b699f0a4883

PrivatePoolOptions.Ids

string

No

The IDs of the elasticity assurances. You can specify a JSON array of up to 100 elasticity assurance IDs.

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

Platform

string

No

Note

This parameter is deprecated.

null

InstanceType

string

No

The instance type. You can use this parameter to query only active elasticity assurances. To query released elasticity assurances, you must use PrivatePoolOptions.Ids.

ecs.c6.large

ZoneId

string

No

The ID of the zone where the Elasticity Assurance is located.

cn-hangzhou-h

InstanceChargeType

string

No

The billing method of the instances. Only PostPaid (pay-as-you-go) is supported.

Default value: PostPaid.

PostPaid

Status

string

No

The status of the Elasticity Assurance. Valid values:

  • All: all statuses.

  • Deactivated: The Elasticity Assurance is pending activation. This status is available only for invitational preview.

  • Preparing: The Elasticity Assurance is being prepared.

  • Prepared: The Elasticity Assurance is ready to take effect.

  • Active: The Elasticity Assurance is active.

  • Released: The Elasticity Assurance is released.

If you do not specify this parameter, elasticity assurances in all states are returned, except for those in the Pending and Released states.

Active

PackageType

string

No

The type of the Elasticity Assurance. Valid values:

  • ElasticityAssurance: a standard elasticity assurance. This type of elasticity assurance is created when you do not specify RecurrenceRules.

  • TimeDivisionElasticityAssurance: a time-division elasticity assurance. This type of elasticity assurance is created when you specify RecurrenceRules.

ElasticityAssurance

Response elements

Element

Type

Description

Example

object

NextToken

string

The token used to retrieve the next page of results.

caeba0bbb2be03f84eb48b699f0a4883

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

The total number of matching entries.

1

MaxResults

integer

The number of entries per page.

10

ElasticityAssuranceSet

object

ElasticityAssuranceItem

array<object>

The details of the elasticity assurances.

array<object>

The details of an elasticity assurance.

Status

string

The status of the elasticity assurance. Valid values:

  • Preparing: The elasticity assurance is being prepared.

  • Prepared: The elasticity assurance is ready to take effect.

  • Active: The elasticity assurance is active.

  • Released: The elasticity assurance has been released.

Active

PrivatePoolOptionsMatchCriteria

string

The matching mode of the elasticity assurance. Valid values:

  • Open: The open mode. The elasticity assurance automatically matches instance launch requests. If no matching private pool is available, the system uses resources from the public pool.

  • Target: The targeted mode. The instance is launched by using the capacity of a specified private pool. If the private pool is unavailable, the instance fails to launch.

Target

PrivatePoolOptionsId

string

The ID of the elasticity assurance.

eap-bp1ir35kqtn8ywci****

UsedAssuranceTimes

integer

Note

This parameter is currently unused.

0

LatestStartTime

string

Note

This parameter is currently unused.

null

PrivatePoolOptionsName

string

The name of the elasticity assurance.

eapTestName

RegionId

string

The ID of the region where the elasticity assurance is located.

cn-hangzhou

EndTime

string

The time when the elasticity assurance expires.

2021-12-03T16:00Z

StartTime

string

The time when the elasticity assurance takes effect.

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 number of times the elasticity assurance can be used. This value is always Unlimited, which indicates an unlimited number of uses within the effective period.

Unlimited

AllocatedResources

object

AllocatedResource

array<object>

The details of the allocated resources.

array<object>

The details of an allocated resource.

UsedAmount

integer

The number of in-use instances.

2

TotalAmount

integer

The total number of reserved instances for the instance type.

2

AvailableAmount

integer

Note

This parameter is currently unused.

5

FailedAmount

integer

1

LockedAmount

integer

1

zoneId

string

The ID of the zone where the elasticity assurance is located.

cn-hangzhou-h

InstanceType

string

The instance type.

ecs.c6.large

ElasticityAssuranceUsages

object

ElasticityAssuranceUsage

array<object>

Note

This parameter is currently unused.

object

Note

This parameter is currently unused.

AccountId

string

Note

This parameter is currently unused.

1144775968548340

ServiceName

string

Note

This parameter is currently unused.

name

UsedAmount

integer

Note

This parameter is currently unused.

1

Tags

object

Tag

array<object>

The tags attached to the elasticity assurance.

object

Details of a tag attached to the elasticity assurance.

TagValue

string

The tag value.

TestValue

TagKey

string

The tag key.

TestKey

InstanceChargeType

string

The billing method of the instance. Only pay-as-you-go is supported.

The value is always PostPaid.

PostPaid

StartTimeType

string

When the elasticity assurance takes effect. Valid values:

  • Now: The elasticity assurance takes effect immediately upon creation.

  • Later: The elasticity assurance takes effect at the time specified by StartTime.

Now

ElasticityAssuranceOwnerId

string

Note

This parameter is currently unused.

e114477596854834

RecurrenceRules

object

RecurrenceRule

array<object>

The recurrence rules for the time-division elasticity assurance.

object

The recurrence rule for the time-division elasticity assurance.

RecurrenceType

string

The recurrence type. Valid values:

  • Daily: Repeats daily.

  • Weekly: Repeats weekly.

  • Monthly: Repeats monthly.

Daily

RecurrenceValue

string

The value of the recurrence rule. The valid values of this parameter depend on the value of the RecurrenceType parameter.

  • If RecurrenceType is Daily, this parameter accepts a single value from 1 to 31, which represents the recurrence interval in days.

  • If RecurrenceType is Weekly, this parameter accepts multiple comma-separated values from 0 to 6, corresponding to Sunday to Saturday. For example, 1,2 indicates that the rule applies on Mondays and Tuesdays.

  • If RecurrenceType is Monthly, this parameter accepts a range in A-B format. The values for A and B must be from 1 to 31, and B must be greater than or equal to A. For example, 1-5 indicates that the rule applies from the first to the fifth day of each month.

1

StartHour

integer

The start hour of the active period for the time-division elasticity assurance.

4

EndHour

integer

The end hour of the active period for the time-division elasticity assurance.

10

PackageType

string

The type of the elasticity assurance. Valid values:

  • ElasticityAssurance: A standard elasticity assurance.

  • TimeDivisionElasticityAssurance: A 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.
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.