DescribeElasticStrength

更新时间:
复制 MD 格式

The effectiveness of a scaling configuration is key to successful scale-out activities. Auto Scaling quantifies this effectiveness as elastic strength to help you optimize your configuration.

Debugging

Call this operation directly in OpenAPI Explorer to simplify API calls. OpenAPI Explorer automatically calculates signatures and generates SDK code examples.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeElasticStrength

The action to perform. Set the value to DescribeElasticStrength.

RegionId String Yes cn-qingdao

The ID of the region.

ScalingGroupId String No asg-bp18p2yfxow2dloq****

The ID of the scaling group.

InstanceTypes.N String No ecs.g6.large

The instance type of the ECS instance.

PriorityStrategy String No NoSpot
Note This parameter is deprecated. Use SpotStrategy instead.

The spot policy for pay-as-you-go instances. This parameter overrides the spot policy of the scaling group. Valid values:

  • NoSpot: The instances are regular pay-as-you-go instances.
  • SpotWithPriceLimit: The instances are spot instances that have a user-defined maximum hourly price.
  • SpotAsPriceGo: The instances are spot instances that use the real-time market price as the bid price.

Default value: NoSpot.

SystemDiskCategories.N String No cloud

The categories of the system disk. Valid values:

  • cloud: basic disk.
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: ESSD.
ScalingGroupIds.N String No asg-bp14wlu85wrpchm0****

The IDs of the scaling groups.

SpotStrategy String No NoSpot

The spot policy for the instances. Valid values:

  • NoSpot: The instances are pay-as-you-go instances.
  • SpotWithPriceLimit: The instances are spot instances that have a user-defined maximum hourly price.
  • SpotAsPriceGo: The instances are spot instances that use the real-time market price as the bid price.

Default value: NoSpot.

VSwitchIds.N String No vsw-bp1whw2u46cn8zubm****

The IDs of the vSwitches.

Note This parameter is required if you do not specify ScalingGroupId.
ImageId String No centos6u5_64_20G_aliaegis****.vhd

The ID of the image from which to create instances.

Note If you do not specify ScalingGroupId, you must specify at least one of ImageId, ImageName, and ImageFamily.
ImageName String No ubuntu_18_04_x64_20G_alibase_20231225.vhd

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

You cannot use ImageName to specify Alibaba Cloud Marketplace images.

Note If you do not specify ScalingGroupId, you must specify at least one of ImageId, ImageName, and ImageFamily.
ImageFamily String No CentOS7

You can use this parameter to create instances from the latest available image in the specified family. If ImageId is specified, this parameter is ignored.

Note If you do not specify ScalingGroupId, you must specify at least one of ImageId, ImageName, and ImageFamily.
DataDiskCategories.N String No cloud_essd

The categories of the data disk. Valid values:

  • cloud: basic disk
  • cloud_efficiency: ultra disk
  • cloud_ssd: standard SSD
  • cloud_essd: ESSD
  • ephemeral_ssd: local SSD
Ipv6AddressCount Integer No 1

The number of IPv6 addresses to assign to the instance. The API may return a low elastic strength score if the specified instance type does not support the requested number of IPv6 addresses.

Note You can specify this parameter if you do not specify ScalingGroupId.

Response parameters

Parameter

Type

Example

Description

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

The request ID.

TotalStrength double 1.5

The total elastic strength score of the scaling group. Each instance type and zone combination receives a score from 0 (weak) to 1 (strong) based on resource availability. This value is the sum of all combination scores.

Warning This parameter is deprecated.
ElasticStrength String Strong

The elastic strength of the scaling group. Valid values:

  • Strong
  • Medium
  • Weak
ResourcePools Array of ResourcePool

Details about the elastic strength of each resource pool.

Strength double 0.6

The elastic strength of the resource pool. This parameter is deprecated.

InstanceType String ecs.c7t.xlarge

The instance type in the resource pool.

ZoneId String cn-hangzhou-g

The ID of the zone where the resource pool is located.

VSwitchIds Array of String vsw-2ze0uc933kantv******

The ID of the vSwitch.

Code String InstanceTypesOrDiskTypesNotSupported

The error code returned when the elastic strength is 0.

Msg String The instanceTypes or diskTypes are not supported.

The error message returned when the elastic strength is 0.

Status String Available

The availability of the resource pool. Valid values:

  • Available: The resource pool is available.
  • Unavailable: The resource pool may be unavailable for reasons such as unmet constraints, an instance type not being deployed, or insufficient inventory of an instance type.
InventoryHealth Object

The inventory health.

HealthScore Integer 3

The inventory health score.

  • 5 to 6: High supply certainty.
  • 1 to 4: Unguaranteed supply. We recommend that you create a capacity reservation on demand.
  • -3 to 0 points: Indicates a supply health warning. We recommend that you change the specification.

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

AdequacyScore Integer 3

The adequacy score.

Valid values: 0 to 3.

SupplyScore Integer 3

The replenishment capability.

Valid values: 0 to 3.

HotScore Integer 3

The popularity.

Valid values: 0 to 3.

ElasticStrength String Medium

The elastic strength of the resource pool, determined by its inventory health and stock status. Valid values:

  • Strong
  • Medium
  • Weak
ElasticStrengthModels Array of ElasticStrengthModel

The elastic strength details returned when you query multiple scaling groups in one request.

ScalingGroupId String asg-wz98mnj7nblv9gc****

The ID of the scaling group.

ElasticStrength String Strong

The elastic strength of the scaling group. Valid values:

  • Strong
  • Medium
  • Weak
TotalStrength double 5

The total elastic strength score of the scaling group. Each instance type and zone combination receives a score from 0 (weak) to 1 (strong) based on resource availability. This value is the sum of all combination scores.

Warning This parameter is deprecated.
ResourcePools Array of ResourcePool

Details about the elastic strength of each resource pool.

InstanceType String ecs.r7.large

The instance type in the resource pool.

Strength double 0.6

The elastic strength of the resource pool.

Warning This parameter is deprecated.
ZoneId String cn-hangzhou-g

The ID of the zone where the resource pool is located.

VSwitchIds Array of String vsw-2ze6e8p4aid08lymlsguv

The ID of the vSwitch.

Code String InstanceTypesOrDiskTypesNotSupported

The error code returned when the elastic strength is 0.

Msg String The instanceTypes or diskTypes are not supported.

The error message returned when the elastic strength is 0.

Status String Available

The availability of the resource pool. Valid values:

  • Available: The resource pool is available.
  • Unavailable: The resource pool may be unavailable for reasons such as unmet constraints, an instance type not being deployed, or insufficient inventory of an instance type.
InventoryHealth Object

The inventory health.

HealthScore Integer 3

The inventory health score.

  • 5 to 6: High supply certainty.
  • 1 to 4: Unguaranteed supply. We recommend that you create a capacity reservation on demand.
  • -3 to 0: Supply health warning. We recommend that you switch to a different instance type.

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

AdequacyScore Integer 3

The adequacy score.

Valid values: 0 to 3.

SupplyScore Integer 2

The replenishment capability.

Valid values: 0 to 3.

HotScore Integer 0

The popularity.

Valid values: 0 to 3.

ElasticStrength String Strong

The elastic strength of the resource pool, determined by its inventory health and stock status. Valid values:

  • Strong
  • Medium
  • Weak

Examples

Sample request

http(s)://ess.aliyuncs.com/?Action=DescribeElasticStrength
&RegionId=cn-qingdao
&ScalingGroupId=asg-bp18p2yfxow2dloq****
&InstanceTypes=["ecs.g6.large"]
&PriorityStrategy=NoSpot
&SystemDiskCategories=["cloud"]
&ScalingGroupIds=["asg-bp14wlu85wrpchm0****"]
&SpotStrategy=NoSpot
&VSwitchIds=["vsw-bp1whw2u46cn8zubm****"]
&ImageId=centos6u5_64_20G_aliaegis****.vhd
&ImageName=ubuntu_18_04_x64_20G_alibase_20231225.vhd
&ImageFamily=CentOS7
&DataDiskCategories=["cloud_essd"]
&Ipv6AddressCount=1
&<common request parameters>

Sample responses

XML format

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

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

JSON format

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

{
  "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
    }
  } ],
  "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
      }
    } ]
  } ]
}

Error codes

For a list of error codes, see the Error Center.