DescribeElasticStrength

更新时间:
复制 MD 格式

A scaling group's configuration is key to successful scale-outs. Auto Scaling uses elasticity strength to quantify the effectiveness of a Scaling Configuration, helping you make targeted optimizations.

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 where the scaling group is located.

cn-qingdao

ScalingGroupId

string

No

The ID of the scaling group.

asg-bp18p2yfxow2dloq****

InstanceTypes

array

No

A list of ECS instance types. If specified, this parameter overrides the instance types in the scaling configuration.

string

No

The ECS instance type.

ecs.g6.large

PriorityStrategy

string

No

Warning This parameter is deprecated. Use SpotStrategy instead.
The spot strategy for pay-as-you-go instances. If specified, this parameter overrides the spot strategy in the scaling configuration. Valid values:

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

  • SpotWithPriceLimit: A spot instance with a specified maximum price.

  • SpotAsPriceGo: A spot instance where the system automatically bids at the current market price.

Default value: NoSpot.

NoSpot

SystemDiskCategories

array

No

A list of system disk categories. If specified, this parameter overrides the system disk categories in the scaling configuration. Valid values:

  • cloud: Basic Cloud Disk.

  • cloud_efficiency: Ultra Cloud Disk.

  • cloud_ssd: Standard SSD.

  • cloud_essd: ESSD.

Note

This parameter is required if ScalingGroupId is not specified.

string

No

The category of the system disk. Valid values:

  • cloud: Basic Cloud Disk.

  • cloud_efficiency: Ultra Cloud Disk.

  • cloud_ssd: Standard SSD.

  • cloud_essd: ESSD.

cloud

ScalingGroupIds

array

No

The IDs of one or more scaling groups to query in a batch operation.

string

No

The ID of a scaling group.

asg-bp14wlu85wrpchm0****

SpotStrategy

string

No

The spot strategy for instances. Valid values:

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

  • SpotWithPriceLimit: A spot instance with a specified maximum price.

  • SpotAsPriceGo: A spot instance where the system automatically bids at the current market price.

Default value: NoSpot.

NoSpot

VSwitchIds

array

No

A list of VSwitch IDs.

Note

This parameter is required if ScalingGroupId is not specified.

string

No

The VSwitch ID.

vsw-bp1whw2u46cn8zubm****

ImageId

string

No

The ID of the image used to create instances.

Note

If ScalingGroupId is not specified, you must specify at least one of ImageId, ImageName, or ImageFamily.

centos6u5_64_20G_aliaegis****.vhd

ImageName

string

No

The name of the image. The name must be unique within a region. If you specify ImageId, this parameter is ignored.

You cannot use this parameter to specify a Marketplace image.

Note

If ScalingGroupId is not specified, you must specify at least one of ImageId, ImageName, or ImageFamily.

ubuntu_18_04_x64_20G_alibase_20231225.vhd

ImageFamily

string

No

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

Note

If ScalingGroupId is not specified, you must specify at least one of ImageId, ImageName, or ImageFamily.

CentOS7

DataDiskCategories

array

No

A list of data disk categories used to evaluate elastic strength. If a category is incompatible, the response identifies the specific mismatched category.

Note

You can specify this parameter if ScalingGroupId is not specified.

string

No

The category of the data disk. Valid values:

  • cloud: Basic Cloud Disk

  • cloud_efficiency: Ultra Cloud Disk

  • cloud_ssd: Standard SSD

  • cloud_essd: ESSD

  • ephemeral_ssd: local SSD

cloud_essd

Ipv6AddressCount

integer

No

The number of IPv6 addresses to be configured for each instance. The elastic strength is lowered for instance types that do not support the specified number of IPv6 addresses.

Note

You can specify this parameter if ScalingGroupId is not specified.

1

Response elements

Element

Type

Description

Example

object

The response schema.

RequestId

string

The request ID.

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

TotalStrength

number

The total elastic strength of the scaling group. The strength is the sum of scores from all configured instance type and zone combinations. Each combination is scored from 0 (low strength) to 1 (high strength) based on resource availability.

Warning This parameter is deprecated.

1.5

ElasticStrength

string

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

  • Strong: high elastic strength.

  • Medium: medium elastic strength.

  • Weak: weak elastic strength.

Strong

ResourcePools

array<object>

An array of resource pools. This parameter is returned when the API call targets a single scaling group.

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 VSwitch ID.

vsw-2ze0uc933kantv******

Code

string

The error code returned when the elastic strength is 0.

IMG_NOT_SUPPORTED

Msg

string

The error message returned when the elastic strength is 0.

The instanceType does not support the image in the configuration.

Status

string

The availability of the resource pool. Valid values:

  • Available: The resource pool is available.

  • Unavailable: The resource pool is unavailable. This can occur if the instance type is not deployed in the zone, has insufficient inventory, or does not meet other constraints.

Available

InventoryHealth

object

The inventory health.

HealthScore

integer

The health score.

  • A score from 5 to 6 indicates high confidence in supply.

  • A score from 1 to 4 indicates that supply is not guaranteed. Consider making on-demand reservations.

  • A score from -3 to 0 indicates a supply health alert. Consider using a different instance type.

The health score is calculated using the formula: HealthScore = AdequacyScore + SupplyScore - HotScore.

3

AdequacyScore

integer

The adequacy score.

Valid values: 0 to 3.

3

SupplyScore

integer

The supply score.

Valid values: 0 to 3.

3

HotScore

integer

The hot score.

Valid values: 0 to 3.

3

ElasticStrength

string

The elastic strength of the resource pool, which is based on its inventory health and current stock. Valid values:

  • Strong: high elastic strength.

  • Medium: medium elastic strength.

  • Weak: weak elastic strength.

Medium

ElasticStrengthModels

array<object>

An array of elastic strength details, returned when the API call targets multiple scaling groups.

array<object>

ScalingGroupId

string

The scaling group ID.

asg-wz98mnj7nblv9gc****

ElasticStrength

string

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

  • Strong: high elastic strength.

  • Medium: medium elastic strength.

  • Weak: weak elastic strength.

Strong

TotalStrength

number

The total elastic strength of the scaling group. The strength is the sum of scores from all configured instance type and zone combinations. Each combination is scored from 0 (low strength) to 1 (high strength) based on resource availability.

Warning This parameter is deprecated.

1.5

ResourcePools

array<object>

Details of the resource pools within the scaling group.

array<object>

InstanceType

string

The instance type of the resource pool.

ecs.r7.large

Strength

number

The elastic strength of the resource pool.

Warning This parameter is 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 VSwitch ID.

vsw-2ze6e8p4******

Code

string

The error code returned when the elastic strength is 0.

InstanceTypesOrDiskTypesNotSupported

Msg

string

The error message returned when the elastic strength is 0.

The instanceTypes or diskTypes are not supported.

Status

string

The availability of the resource pool. Valid values:

  • Available: The resource pool is available.

  • Unavailable: The resource pool is unavailable. This can occur if the instance type is not deployed in the zone, has insufficient inventory, or does not meet other constraints.

Available

InventoryHealth

object

The inventory health.

HealthScore

integer

The health score.

  • A score from 5 to 6 indicates high confidence in supply.

  • A score from 1 to 4 indicates that supply is not guaranteed. Consider making on-demand reservations.

  • A score from -3 to 0 indicates a supply health alert. Consider using a different instance type.

The health score is calculated using the formula: HealthScore = AdequacyScore + SupplyScore - HotScore.

3

AdequacyScore

integer

The adequacy score.

Valid values: 0 to 3.

3

SupplyScore

integer

The supply score.

Valid values: 0 to 3.

2

HotScore

integer

The hot score.

Valid values: 0 to 3.

0

ElasticStrength

string

The elastic strength of the resource pool, which is based on its inventory health and current stock. Valid values:

  • Strong: high elastic strength.

  • Medium: medium elastic strength.

  • Weak: weak 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": "IMG_NOT_SUPPORTED",
      "Msg": "The instanceType does not support the image in the configuration.",
      "Status": "Available",
      "InventoryHealth": {
        "HealthScore": 3,
        "AdequacyScore": 3,
        "SupplyScore": 3,
        "HotScore": 3
      },
      "ElasticStrength": "Medium"
    }
  ],
  "ElasticStrengthModels": [
    {
      "ScalingGroupId": "asg-wz98mnj7nblv9gc****",
      "ElasticStrength": "Strong",
      "TotalStrength": 1.5,
      "ResourcePools": [
        {
          "InstanceType": "ecs.r7.large",
          "Strength": 0.6,
          "ZoneId": "cn-hangzhou-g",
          "VSwitchIds": [
            "vsw-2ze6e8p4******"
          ],
          "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.