DescribeElasticStrength

Updated at:

Queries the elastic strength of a scaling group. The validity of the scaling configuration largely determines the success rate of the scale-out process. Auto Scaling uses elastic strength to quantify the quality of the scaling configuration and help you optimize it.

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

ess:DescribeElasticStrength

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region to which the scaling group belongs.

cn-qingdao

ScalingGroupId

string

No

The ID of the scaling group.

asg-bp18p2yfxow2dloq****

InstanceTypes

array

No

The instance types of ECS instances. If you specify this parameter, it overrides the instance types in the scaling configuration.

string

No

The instance type of the ECS instance.

ecs.g6.large

PriorityStrategy

string

No

[Deprecated] Use SpotStrategy instead. The preemption policy for pay-as-you-go instances. If you specify this parameter, it overrides the preemption policy configured for the scaling group. Valid values:

  • NoSpot: regular pay-as-you-go instance

  • SpotWithPriceLimit: spot instance with a maximum price

  • SpotAsPriceGo: spot instance whose price is automatically set by the system based on the current market price

Default value: NoSpot.

NoSpot

SystemDiskCategories

array

No

The system cloud disk types. If you specify this parameter, it overrides the system cloud disk types in the scaling configuration. Valid values:

  • cloud: basic cloud disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

Note

This parameter is required when the scaling group ID is not specified.

string

No

The disk types of the system cloud disk. Valid values:

  • cloud: basic cloud disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

cloud

ScalingGroupIds

array

No

The IDs of the scaling groups to query in a batch.

string

No

The ID of the scaling group.

asg-bp14wlu85wrpchm0****

SpotStrategy

string

No

The preemption policy for instances. Valid values:

  • NoSpot: regular pay-as-you-go instance

  • SpotWithPriceLimit: spot instance with a maximum price

  • SpotAsPriceGo: spot instance whose price is automatically set by the system based on the current market price

Default value: NoSpot.

NoSpot

VSwitchIds

array

No

The IDs of the vSwitches.

Note

This parameter is required when the scaling group ID is not specified.

string

No

The IDs of the vSwitches.

Note

This parameter is required when the scaling group ID is not specified.

vsw-bp1whw2u46cn8zubm****

ImageId

string

No

The ID of the image file. The image resource used for the automatic creation of instances.

Note

When the scaling group ID is not specified, you must specify at least one of ImageId, ImageName, and ImageFamily.

centos6u5_64_20G_aliaegis****.vhd

ImageName

string

No

The name of the image. The image name must be unique within a region. If ImageId is specified, ImageName is ignored.

You cannot use ImageName to specify an Alibaba Cloud Marketplace image.

Note

When the scaling group ID is not specified, you must specify at least one of ImageId, ImageName, and ImageFamily.

ubuntu_18_04_x64_20G_alibase_20231225.vhd

ImageFamily

string

No

The name of the image family. You can set this parameter to obtain the latest available image in the image family to create instances. If ImageId is specified, you cannot specify this parameter.

Note

When the scaling group ID is not specified, you must specify at least one of ImageId, ImageName, and ImageFamily.

CentOS7

DataDiskCategories

array

No

Queries the elasticity level when multiple data cloud disk types are specified. If a data cloud disk type mismatch occurs, the query result returns the specific mismatched disk types.

Note

You can specify this parameter when the scaling group ID is not specified.

string

No

The data cloud disk type. Valid values:

  • cloud: basic cloud disk

  • cloud_efficiency: ultra disk

  • cloud_ssd: standard SSD

  • cloud_essd: ESSD

  • ephemeral_ssd: local SSD

cloud_essd

Ipv6AddressCount

integer

No

The number of IPv6 addresses. If the instance type does not meet the requirement for the number of IPv6 addresses, the elastic strength is weak.

Note

You can specify this parameter when the scaling group ID is not specified.

1

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The ID of the request.

73469C7-AA6F-4DC5-B3DB-A3DC0DE3****

TotalStrength

number

The elastic strength of the scaling group. Each combination of instance type and zone is scored from 0 to 1 based on the supply status, where 0 indicates low elastic strength and 1 indicates high elastic strength. The sum of the scores of all combinations of instance types and zones is the elastic strength of the scaling group.

Warning [Deprecated]

1.5

ElasticStrength

string

The current elastic strength of the scaling group. Valid values:

  • Strong: high elastic strength

  • Medium: medium elastic strength

  • Weak: low elastic strength

Strong

ResourcePools

array<object>

The elastic strength details when a single scaling group is queried.

array<object>

Strength

number

The elastic strength of the resource pool.

0.6

InstanceType

string

The instance type of the resource pool.

ecs.c7t.xlarge

ZoneId

string

The zone ID of the resource pool.

cn-hangzhou-g

VSwitchIds

array

The vSwitches in the zone of the resource pool.

string

The ID of the vSwitch.

vsw-2ze0uc933kantv******

Code

string

The error code indicating the reason why the elastic strength is 0.

InstanceTypesOrDiskTypesNotSupported

Msg

string

The error message indicating the reason why the elastic strength is 0.

The instanceTypes or diskTypes are not supported.

Status

string

Specifies whether the resource pool is available. Valid values:

  • Available: The resource pool is available.

  • Unavailable: The resource pool is unavailable. The instance type is unavailable due to constraint failures, undeployed instance types, or out-of-stock instance types.

Available

InventoryHealth

object

The inventory health of the resource pool.

HealthScore

integer

The inventory health score.

  • 5 to 6: indicates high supply certainty.

  • 1 to 4: indicates uncertain supply. Consider using capacity reservations as needed.

  • -3 to 0: indicates a supply health warning. Consider changing the instance type.

Formula: HealthScore (inventory health score) = AdequacyScore (adequacy) + SupplyScore (supply capability) - HotScore (popularity).

3

AdequacyScore

integer

The adequacy score.

Valid values: 0 to 3.

3

SupplyScore

integer

The supply capability score.

Valid values: 0 to 3.

3

HotScore

integer

The popularity score.

Valid values: 0 to 3.

3

ElasticStrength

string

The current elastic strength of the resource pool, which comprehensively considers the inventory health and current inventory status of the resource pool. Valid values:

  • Strong: high elastic strength

  • Medium: medium elastic strength

  • Weak: low elastic strength

Medium

ElasticStrengthModels

array<object>

The elastic strength details when scaling groups are queried in a batch.

array<object>

ScalingGroupId

string

The ID of the scaling group.

asg-wz98mnj7nblv9gc****

ElasticStrength

string

The current elastic strength of the scaling group. Valid values:

  • Strong: high elastic strength

  • Medium: medium elastic strength

  • Weak: low elastic strength

Strong

TotalStrength

number

The current elastic strength of the scaling group. Each combination of instance type and zone is scored from 0 to 1 based on the supply status, where 0 indicates low elastic strength and 1 indicates high elastic strength. The sum of the scores of all combinations of instance types and zones is the elastic strength of the scaling group.

Warning [Deprecated]

5

ResourcePools

array<object>

The elastic strength information of each resource pool.

array<object>

InstanceType

string

The instance type of the resource pool.

ecs.r7.large

Strength

number

The elastic strength of the resource pool.

Warning [Deprecated]

0.6

ZoneId

string

The zone ID of the resource pool.

cn-hangzhou-g

VSwitchIds

array

The vSwitches in the zone of the resource pool.

string

The ID of the vSwitch.

vsw-2ze6e8p4aid08lymlsguv

Code

string

The error code indicating the reason why the elastic strength is 0.

InstanceTypesOrDiskTypesNotSupported

Msg

string

The error message indicating the reason why the elastic strength is 0.

The instanceTypes or diskTypes are not supported.

Status

string

Specifies whether the resource pool is available. Valid values:

  • Available: The resource pool is available.

  • Unavailable: The resource pool is unavailable. The instance type is unavailable due to constraint failures, undeployed instance types, or out-of-stock instance types.

Available

InventoryHealth

object

The inventory health of the resource pool.

HealthScore

integer

The inventory health score.

  • 5 to 6: indicates high supply certainty.

  • 1 to 4: indicates uncertain supply. Consider using capacity reservations as needed.

  • -3 to 0: indicates a supply health warning. Consider changing the instance type.

Formula: HealthScore (inventory health score) = AdequacyScore (adequacy) + SupplyScore (supply capability) - HotScore (popularity).

3

AdequacyScore

integer

The adequacy score.

Valid values: 0 to 3.

3

SupplyScore

integer

The supply capability score.

Valid values: 0 to 3.

2

HotScore

integer

The popularity score.

Valid values: 0 to 3.

0

ElasticStrength

string

The current elastic strength of the resource pool, which comprehensively considers the inventory health and current inventory status of the resource pool. Valid values:

  • Strong: high elastic strength

  • Medium: medium elastic strength

  • Weak: low elastic strength

Strong

Examples

Success response

JSON format

{
  "RequestId": "73469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "TotalStrength": 1.5,
  "ElasticStrength": "Strong",
  "ResourcePools": [
    {
      "Strength": 0.6,
      "InstanceType": "ecs.c7t.xlarge",
      "ZoneId": "cn-hangzhou-g",
      "VSwitchIds": [
        "vsw-2ze0uc933kantv******"
      ],
      "Code": "InstanceTypesOrDiskTypesNotSupported",
      "Msg": "The instanceTypes or diskTypes are not supported.",
      "Status": "Available",
      "InventoryHealth": {
        "HealthScore": 3,
        "AdequacyScore": 3,
        "SupplyScore": 3,
        "HotScore": 3
      },
      "ElasticStrength": "Medium"
    }
  ],
  "ElasticStrengthModels": [
    {
      "ScalingGroupId": "asg-wz98mnj7nblv9gc****",
      "ElasticStrength": "Strong",
      "TotalStrength": 5,
      "ResourcePools": [
        {
          "InstanceType": "ecs.r7.large",
          "Strength": 0.6,
          "ZoneId": "cn-hangzhou-g",
          "VSwitchIds": [
            "vsw-2ze6e8p4aid08lymlsguv"
          ],
          "Code": "InstanceTypesOrDiskTypesNotSupported",
          "Msg": "The instanceTypes or diskTypes are not supported.",
          "Status": "Available",
          "InventoryHealth": {
            "HealthScore": 3,
            "AdequacyScore": 3,
            "SupplyScore": 2,
            "HotScore": 0
          },
          "ElasticStrength": "Strong"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.