All Products
Search
Document Center

Auto Scaling:DescribeElasticStrength

Last Updated:Dec 17, 2024

Queries the scaling strength of a scaling configuration. The success rate of scale-out events depends on the scaling strength of the scaling configuration that you want to use. By checking the scaling strength of a scaling configuration, you can enable Auto Scaling to measure its performance and improve specific configurations.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ess:DescribeElasticStrengthget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the scaling group.

cn-qingdao
ScalingGroupIdstringNo

The ID of the scaling group.

asg-bp18p2yfxow2dloq****
InstanceTypesarrayNo

The instance types. The instance types specified by this parameter overwrite the instance types specified in the scaling configuration.

stringNo

The instance type.

ecs.g6.large
PriorityStrategystringNo

The preemption policy that you want to apply to pay-as-you-go instances. The preemption policy specified by this parameter overwrites the preemption policy specified in the scaling configuration. Valid values:

  • NoSpot: The instances are created as regular pay-as-you-go instances.
  • SpotWithPriceLimit: The instances are created as preemptible instances that have a user-defined maximum hourly price.
  • SpotAsPriceGo: The instances are created as preemptible instances for which the market price at the time of purchase is automatically used as the bidding price.

Default value: NoSpot.

NoSpot
SystemDiskCategoriesarrayNo

The categories of the system disks. The categories of the system disks specified by this parameter overwrite the categories of the system disks specified in the scaling configuration. Valid values:

  • cloud: basic disk.
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: Enterprise SSD (ESSD).
stringNo

The category of the system disk. Valid values:

  • cloud: basic disk.
  • cloud_efficiency: ultra disk.
  • cloud_ssd: standard SSD.
  • cloud_essd: ESSD.
cloud
ScalingGroupIdsarrayNo

The IDs of the scaling groups that you want to query.

stringNo

The ID of the scaling group.

asg-bp14wlu85wrpchm0****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

The scaling strength of the scaling group. Each combination of instance type + zone is scored from 0 to 1 based on its availability, with 0 being the weakest scaling strength and 1 being the strongest. The scaling strength of the scaling group is measured by the combined scores of all the combinations of instance type + zone.

1.5
ResourcePoolsarray<object>

The resource pools.

ResourcePoolobject
Strengthdouble

The scaling strength of the resource pool.

0.6
InstanceTypestring

The instance type of the resource pool.

ecs.c7t.xlarge
ZoneIdstring

The zone ID of the resource pool.

cn-hangzhou-g
VSwitchIdsarray

The IDs of the vSwitches in the zones of the resource pool.

VSwitchIdstring

The ID of the vSwitch.

vsw-2ze0uc933kantv******
Codestring

The error code returned when the scaling strength is the weakest.

IMG_NOT_SUPPORTED
Msgstring

The error message returned when the scaling strength is the weakest.

The instanceType does not support the image in the configuration.
ElasticStrengthModelsarray<object>

The scaling strengths of scaling configurations that are queried at the same time.

ElasticStrengthModelobject
ScalingGroupIdstring

The ID of the scaling group.

asg-wz98mnj7nblv9gc****
TotalStrengthdouble

The scaling strength of the scaling group. Each combination of instance type + zone is scored from 0 to 1 based on its availability, with 0 being the weakest scaling strength and 1 being the strongest. The scaling strength of the scaling group is measured by the combined scores of all the combinations of instance type + zone.

1.5
ResourcePoolsarray<object>

The resource pools.

ResourcePoolobject
InstanceTypestring

The instance type of the resource pool.

ecs.r7.large
Strengthdouble

The scaling strength of the resource pool.

0.6
ZoneIdstring

The zone ID of the resource pool.

cn-hangzhou-g
VSwitchIdsarray

The IDs of the vSwitches in the zones of the resource pool.

VSwitchIdstring

The ID of the vSwitch.

vsw-2ze6e8p4******
Codestring

The error code returned when the scaling strength is the weakest.

InstanceTypesOrDiskTypesNotSupported
Msgstring

The error message returned when the scaling strength is the weakest.

The instanceTypes or diskTypes are not supported.

Examples

Sample success responses

JSONformat

{
  "RequestId": "73469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "TotalStrength": 1.5,
  "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."
    }
  ],
  "ElasticStrengthModels": [
    {
      "ScalingGroupId": "asg-wz98mnj7nblv9gc****",
      "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."
        }
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-02The request parameters of the API has changedView Change Details