DescribeScalingGroups

Updated at:

Queries scaling groups.

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:DescribeScalingGroups

get

*ScalingGroup

acs:ess:{#regionId}:{#accountId}:scalinggroup/{#ScalingGroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the scaling group.

cn-qingdao

PageNumber

integer

No

The page number of the scaling group list. Minimum value: 1.

Default value: 1.

1

PageSize

integer

No

The number of entries per page for paging queries. Maximum value: 50.

Default value: 10.

Valid values:

  • 10 :

    10

10

ScalingGroupName

string

No

The name of the scaling group.

scalinggroup****

ScalingGroupName.1

string

No

ScalingGroupName.1 为待查询的伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.2

string

No

ScalingGroupName.2 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.3

string

No

ScalingGroupName.3 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.4

string

No

ScalingGroupName.4 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.5

string

No

ScalingGroupName.5 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.6

string

No

ScalingGroupName.6 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.7

string

No

ScalingGroupName.7 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.8

string

No

ScalingGroupName.8 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.9

string

No

ScalingGroupName.9 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.10

string

No

ScalingGroupName.10 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.11

string

No

ScalingGroupName.11 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.12

string

No

ScalingGroupName.12 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.13

string

No

ScalingGroupName.13 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.14

string

No

ScalingGroupName.14 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.15

string

No

ScalingGroupName.15 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.16

string

No

ScalingGroupName.16 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.17

string

No

ScalingGroupName.17 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.18

string

No

ScalingGroupName.18 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.19

string

No

ScalingGroupName.19 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

ScalingGroupName.20

string

No

ScalingGroupName.20 为待查询伸缩组的名称。查询结果会忽略失效的伸缩组名称,并且不报错。

scalinggroup****

GroupType

string

No

The type of instances managed by the scaling group. Valid values:

  • ECS: The scaling group manages ECS instances.

  • ECI: The scaling group manages ECI instances.

ECS

ScalingGroupId

array

No

The ID of the scaling group to query. ScalingGroupId.N specifies the Nth scaling group ID. Valid values of N: 1 to 20. Invalid scaling group IDs are ignored in the query results, and no error is returned.

asg-bp14wlu85wrpchm0****

string

No

The ID of the scaling group to query. ScalingGroupId.N specifies the Nth scaling group ID. Valid values of N: 1 to 20. Invalid scaling group IDs are ignored in the query results, and no error is returned.

asg-bp14wlu85wrpchm0****

ResourceGroupId

string

No

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

Note

If no scaling group belongs to the specified resource group, an empty result is returned, and no error is returned.

rg-123****

Tag

array<object>

No

The tags of the scaling group.

object

No

The tags of the scaling group.

Key

string

No

The tag key of the scaling group.

Department

Value

string

No

The tag value of the scaling group.

Finance

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

PageNumber

integer

The current page number.

1

PageSize

integer

The number of entries per page.

10

TotalCount

integer

The total number of scaling groups.

1

ScalingGroups

object

ScalingGroup

array<object>

The collection of scaling group information.

array<object>

The collection of scaling group information.

VpcId

string

The ID of the virtual private cloud (VPC) in which the scaling group resides.

vpc-bp1vwnn14rqpyiczj****

CreationTime

string

The time when the scaling group was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.

2014-08-14T10:58Z

TotalInstanceCount

integer

The total number of ECS instances in the scaling group.

1

ScalingGroupName

string

The name of the scaling group.

dyrSuvBOtO1dEdIlIbp****

SpotInstancePools

integer

The number of instance types that are specified. Auto Scaling creates preemptible instances of multiple instance types that are provided at the lowest price. Valid values: 0 to 10.

If you set the MultiAZPolicy parameter to COMPOSABLE, the default value of this parameter is 2.

5

StoppedCapacity

integer

The number of instances that were stopped in Economical Mode in the scaling group.

1

OnDemandPercentageAboveBaseCapacity

integer

The percentage of pay-as-you-go instances in the excess instances when the minimum number of pay-as-you-go instances is reached. The OnDemandBaseCapacity parameter specifies the minimum number of pay-as-you-go instances that must be contained in the scaling group. Valid values: 0 to 100.

If you set the MultiAZPolicy parameter to COMPOSABLE, the default value of this parameter is 100.

20

ModificationTime

string

The time when the scaling group was modified. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.

2014-08-14T10:58Z

MinSize

integer

The minimum number of ECS instances that must be contained in the scaling group.

1

ScalingGroupId

string

The ID of the scaling group.

asg-bp14wlu85wrpchm0****

CompensateWithOnDemand

boolean

Indicates whether pay-as-you-go instances can be automatically created to meet the requirement on the number of ECS instances when the expected capacity of preemptible instances cannot be provided due to reasons such as cost-related issues and insufficient resources. This parameter is available only if you set the MultiAZPolicy parameter to COST_OPTIMIZED. Valid values:

  • true

  • false

true

ScalingPolicy

string

The reclaim mode of the scaling group. Valid values:

  • recycle: economical mode

  • release: release mode

For information about how to remove instances, see the RemoveInstances topic.

recycle

RemovingWaitCapacity

integer

The number of ECS instances that are in the Pending Remove state in the scaling group.

1

ActiveCapacity

integer

The number of ECS instances that are in the In Service state in the scaling group.

1

OnDemandBaseCapacity

integer

The minimum number of pay-as-you-go instances that must be contained in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances in the scaling group is less than the value of this parameter, Auto Scaling preferentially creates pay-as-you-go instances.

If you set the MultiAZPolicy parameter to COMPOSABLE, the default value of this parameter is 0.

30

ProtectedCapacity

integer

The number of ECS instances that are in the Protected state in the scaling group.

1

HealthCheckType

string

The health check mode of the scaling group. Valid values:

  • NONE: Auto Scaling does not perform health checks.

  • ECS: Auto Scaling performs health checks on ECS instances in the scaling group.

ECS

LifecycleState

string

The status of the scaling group. Valid values:

  • Active: The scaling group is active. Scaling groups that are in the Active state can receive requests to execute scaling rules and trigger scaling activities.

  • Inactive: The scaling group is inactive. Scaling groups that are in the Inactive state cannot receive requests to execute scaling rules.

  • Deleting: The scaling group is being deleted. Scaling groups that are being deleted cannot receive requests to execute scaling rules. In addition, the parameter settings of the scaling groups cannot be modified.

Active

GroupDeletionProtection

boolean

Indicates whether deletion protection is enabled for the scaling group. Valid values:

  • true: Deletion protection is enabled for the scaling group. The scaling group cannot be deleted.

  • false: Deletion protection is disabled for the scaling group.

true

ActiveScalingConfigurationId

string

The ID of the active scaling configuration in the scaling group.

asc-bp1et2qekq3ojr33****

GroupType

string

The type of the instances that are managed by the scaling group.

ECS

MultiAZPolicy

string

The scaling policy for the multi-zone scaling group that contains ECS instances. Valid values:

  • PRIORITY: ECS instances are created based on the value of the VSwitchIds.N parameter. If Auto Scaling fails to create ECS instances in the zone where the vSwitch that has the highest priority resides, Auto Scaling creates ECS instances in the zone where the vSwitch that has the next highest priority resides.

  • COST_OPTIMIZED: ECS instances are created based on the unit price of vCPUs. Auto Scaling preferentially creates ECS instances whose vCPUs have the lowest price. If you specified preemptible instance types in the scaling configuration, Auto Scaling preferentially creates preemptible instances. You can use the CompensateWithOnDemand parameter to specify whether to automatically create pay-as-you-go instances when preemptible instances cannot be created due to insufficient resources.

    **

    Note The COST_OPTIMIZED setting takes effect only when multiple instance types are specified or preemptible instances are used.

  • BALANCE: ECS instances are evenly distributed across the zones that are specified for the scaling group. If ECS instances are unevenly distributed across zones due to insufficient resources, you can call the RebalanceInstance operation to evenly redistribute the instances across the zones.

  • COMPOSABLE: You can combine the preceding policies based on your business requirements.

PRIORITY

RemovingCapacity

integer

The number of ECS instances that are being removed from the scaling group.

0

PendingWaitCapacity

integer

The number of ECS instances in the Pending Add state in the scaling group.

1

StandbyCapacity

integer

The number of instances that are in the Standby state in the scaling group.

1

PendingCapacity

integer

The number of ECS instances that are being added to the scaling group and still being configured.

0

LaunchTemplateId

string

The ID of the launch template that is used by the scaling group.

lt-m5e3ofjr1zn1aw7****

TotalCapacity

integer

The total weighted capacity of all ECS instances in the scaling group if the WeightedCapacity parameter is specified. In other cases, the value of this parameter indicates the total number of ECS instances in the scaling group.

1

DesiredCapacity

integer

The expected number of ECS instances in the scaling group. Auto Scaling automatically maintains the expected number of ECS instances in the scaling group.

5

SpotInstanceRemedy

boolean

Indicates whether preemptible instances can be supplemented. If this parameter is set to true, Auto Scaling creates an instance to replace a preemptible instance when Auto Scaling receives a system message which indicates that the preemptible instance is to be reclaimed.

true

LaunchTemplateVersion

string

The version of the launch template that is used by the scaling group.

Default

RegionId

string

The region ID of the scaling group.

cn-qingdao

VSwitchId

string

The ID of the vSwitch that is associated with the scaling group.

vsw-bp1whw2u46cn8zubm****

MaxSize

integer

The maximum number of ECS instances that can be contained in the scaling group.

2

DefaultCooldown

integer

The cooldown period of the scaling group. During the cooldown period, Auto Scaling executes only the scaling activities that are triggered by CloudMonitor event-triggered tasks.

60

VServerGroups

object

VServerGroup

array<object>

The backend vServer groups.

array<object>

The List of backend server groups.

LoadBalancerId

string

The ID of the Server Load Balancer (SLB) instance to which the backend vServer group belongs.

147b46d767c-cn-qingdao-cm5****

VServerGroupAttributes

object

VServerGroupAttribute

array<object>

The attributes of the backend vServer groups.

object

Backend server group property.

VServerGroupId

string

The ID of the backend vServer group.

rsp-bp12bjrny****

Weight

integer

The weight of the backend vServer group.

1

Port

integer

The port number that is used by the SLB instance to provide external services.

22

LaunchTemplateOverrides

object

LaunchTemplateOverride

array<object>

The information about the instance types that are specified by using the Extended Configurations feature of the launch template.

object

The instance type information of the extended launch template.

WeightedCapacity

integer

The weight of the instance type. The value of this parameter indicates the capacity of a single instance of the specified instance type in the scaling group. A greater weight indicates that a smaller number of instances of the specified instance type are required to meet the expected capacity requirement.

4

InstanceType

string

The instance type. The instance type that is specified by this parameter overrides the instance type that is specified in the launch template.

ecs.c5.xlarge

SpotPriceLimit

number

The maximum bid price of the instance type that is specified by the InstanceType parameter. You can specify 1 to 10 instance types by using the Extended Configurations feature of the launch template.

Note

This parameter is available only if you specify the LaunchTemplateId parameter.

0.025

AlbServerGroups

object

AlbServerGroup

array<object>

Details of Application Load Balancer (ALB) server groups.

object

A collection of information about ALB server groups.

AlbServerGroupId

string

The ID of the ALB server group.

sgp-ddwb0y0g6y9bjm****

Weight

integer

The weight of an ECS instance after Auto Scaling adds the ECS instance to the ALB server group as a backend server.

100

Port

integer

The port number that is used by an ECS instance after Auto Scaling adds the ECS instance to the ALB server group.

80

ServerGroups

object

ServerGroup

array<object>

The ID of the server group.

object

A collection of information about the load balancing server group.

ServerGroupId

string

The ID of the backend vServer group.

sgp-i9ouakeaerr*****

Type

string

The type of the vulnerability. Set the value to cve, which indicates image vulnerabilities.

ALB

Weight

integer

The weight of the backend vServer group.

100

Port

integer

The port number that is used by the SLB instance to provide external services.

80

RemovalPolicies

object

RemovalPolicy

array

The instance removal policies. Valid values:

  • OldestInstance: removes ECS instances that are added at the earliest point in time to the scaling group.

  • NewestInstance: removes ECS instances that are most recently added to the scaling group.

  • OldestScalingConfiguration: removes ECS instances that are created based on the earliest scaling configuration.

  • CustomPolicy: removes ECS instances based on the custom scale-in policy (Function).

The scaling configuration source specified by the OldestScalingConfiguration setting can be a scaling configuration or a launch template. The CustomPolicy setting takes effect only if you specify it as the first step to remove instances. If you specify CustomPolicy, you must also specify the CustomPolicyARN parameter.

Note

The removal of ECS instances from a scaling group is also affected by the value of the MultiAZPolicy parameter. For more information, see the Configure a combination policy for removing instances topic.

string

The instance removal policies. Valid values:

  • OldestInstance: removes ECS instances that are added at the earliest point in time to the scaling group.

  • NewestInstance: removes ECS instances that are most recently added to the scaling group.

  • OldestScalingConfiguration: removes ECS instances that are created based on the earliest scaling configuration.

  • CustomPolicy: removes ECS instances based on the custom scale-in policy (Function).

The scaling configuration source specified by the OldestScalingConfiguration setting can be a scaling configuration or a launch template. The CustomPolicy setting takes effect only if you specify it as the first step to remove instances. If you specify CustomPolicy, you must also specify the CustomPolicyARN parameter.

Note

The removal of ECS instances from a scaling group is also affected by the value of the MultiAZPolicy parameter. For more information, see the Configure a combination policy for removing instances topic.

OldestScalingConfiguration

DBInstanceIds

object

DBInstanceId

array

The IDs of the ApsaraDB RDS instances that you want to associate with the scaling group. The value can be a JSON array that contains multiple ApsaraDB RDS instance IDs. Separate multiple IDs with commas (,).

You can associate only a limited number of ApsaraDB RDS instances with a scaling group. Go to Quota Center to check the maximum number of ApsaraDB RDS instances that you can associate with a scaling group.

string

The IDs of the ApsaraDB RDS instances that you want to associate with the scaling group. The value can be a JSON array that contains multiple ApsaraDB RDS instance IDs. Separate multiple IDs with commas (,).

You can associate only a limited number of ApsaraDB RDS instances with a scaling group. Go to Quota Center to check the maximum number of ApsaraDB RDS instances that you can associate with a scaling group.

rm-bp15556qzebg1****

LoadBalancerIds

object

LoadBalancerId

array

The IDs of the SLB instances that are associated with the scaling group.

string

The IDs of the SLB instances that are associated with the scaling group.

lb-bp19byhscefk3x0li****

VSwitchIds

object

VSwitchId

array

The IDs of the vSwitches that are associated with the scaling group. If you specify the VSwitchIds parameter, the VSwitchId parameter is ignored.

string

The ID of the vSwitch that is associated with the scaling group. If you specify the VSwitchIds parameter, the VSwitchId parameter is ignored.

vsw-bp1whw2u46cn8zubm****

SuspendedProcesses

object

SuspendedProcess

array

The processes that are suspended. If no process is suspended, null is returned. Valid values:

  • ScaleIn: scale-in

  • ScaleOut: scale-out

  • HealthCheck: health check

  • AlarmNotification: event-triggered task

  • ScheduledAction: scheduled task

string

The processes that are suspended. If no process is suspended, null is returned. Valid values:

  • ScaleIn: scale-in

  • ScaleOut: scale-out

  • HealthCheck: health check

  • AlarmNotification: event-triggered task

  • ScheduledAction: scheduled task

ScaleIn

SystemSuspended

boolean

Indicates whether Auto Scaling stops executing scaling activities in the scaling group. Valid values:

  • true: If the scaling activities fail for more than seven consecutive days, Auto Scaling stops executing scaling activities in the scaling group. You must modify the scaling group or scaling configuration to resume the execution of the scaling activities.

  • false: Auto Scaling does not stop executing scaling activities in the scaling group.

true

MonitorGroupId

string

The ID of the CloudMonitor application group that is associated with the scaling group.

1497****

AzBalance

boolean

Specifies whether to evenly distribute instances in the scaling group across zones. This parameter is available only if you set the MultiAZPolicy parameter to COMPOSABLE. Valid values:

  • true

  • false

Default value: false.

false

AllocationStrategy

string

The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create the required number of instances. The policy can be applied to pay-as-you-go instances and preemptible instances. This parameter takes effect only when you set the MultiAZPolicy parameter to COMPOSABLE. Valid values:

  • priority: Auto Scaling selects instance types based on the specified order of the instance types to create the required number of instances.

  • lowestPrice: Auto Scaling selects instance types that have the lowest unit price of vCPUs to create the required number of instances.

Default value: priority.

priority

SpotAllocationStrategy

string

The allocation policy of preemptible instances. You can use this parameter to individually specify the allocation policy of preemptible instances. This parameter takes effect only if you set the MultiAZPolicy parameter to COMPOSABLE. Valid values:

  • priority: Auto Scaling selects instance types based on the specified order of the instance types to create the required number of preemptible instances.

  • lowestPrice: Auto Scaling selects instance types that have the lowest unit price of vCPUs to create the required number of preemptible instances.

Default value: priority.

lowestPrice

MaxInstanceLifetime

integer

The maximum life span of an instance in the scaling group. Unit: seconds.

Valid values: 86400 to the value of the Integer.maxValue parameter.

Default value: null.

null

CustomPolicyARN

string

The Alibaba Cloud Resource Name (ARN) of the custom scale-in policy (Function). This parameter is available only if you specify CustomPolicy as the first step to remove instances.

acs:fc:cn-zhangjiakou:16145688****:services/ess_custom_terminate_policy.LATEST/functions/ess_custom_terminate_policy_name

InitCapacity

integer

The number of instances that are in the Initialized state before the instances are added to the scaling group.

0

ResourceGroupId

string

The ID of the resource group to which the ECS instance belongs.

rg-123****

LoadBalancerConfigs

object

LoadBalancerConfig

array<object>

List of CLB (formerly SLB) configurations.

object

The list of Classic Load Balancer (CLB, formerly known as SLB) configurations.

LoadBalancerId

string

The IDs of the SLB instances that are associated with the scaling group.

147b46d767c-cn-qingdao-cm5****

Weight

integer

The weight of an ECS instance after Auto Scaling adds the ECS instance to the ALB server group as a backend server.

10

EnableDesiredCapacity

boolean

Indicates whether the expected number of instances identity is enabled. Valid values:

  • true: Enabled. The query result of the scaling group includes the expected number of instances.

  • false: Disabled. The query result of the scaling group does not include the expected number of instances.

false

Tags

object

Tag

array<object>

The collection of tags for the scaling group.

object

The collection of tag information for the scaling group.

TagKey

string

The tag key of the scaling group.

Department

TagValue

string

The tag value of the scaling group.

Finance

Propagate

boolean

Indicates whether the tag is propagatable. Possible values:

  • true: The tag on the scaling group is propagated only to newly created instances, not to instances already running in the scaling group.

  • false: The tag on the scaling group is not propagated to instances.

Default value: false.

false

HealthCheckTypes

object

HealthCheckType

array

The health check method for the scaling group. Valid values:

  • NONE: No health check is performed.

  • ECS: Performs health checks on instances in the scaling group (this value enables instance health checks for both ECS and ECI scaling groups).

  • LOAD_BALANCER: Determines the health status of instances based on the health check results from the load balancer (CLB load balancing type is not supported yet).

string

The health check method for the scaling group. Valid values:

  • NONE: No health check is performed.

  • ECS: Performs health checks on instances in the scaling group (this value enables instance health checks for both ECS and ECI scaling groups).

  • LOAD_BALANCER: Determines the health status of instances based on the health check results from the load balancer (CLB load balancing type is not supported yet).

ECS

DBInstances

object

DBInstance

array<object>

The list of databases associated with the scaling group.

array<object>

The configuration information of the databases associated with the scaling group.

DBInstanceId

string

The database instance ID.

rm-m5eqju85s45mu0***

Type

string

The database type. Valid values:

  • RDS.

  • Redis.

  • MongoDB.

RDS

SecurityGroupIds

object

SecurityGroupId

array

The whitelist of security groups that the scaling group adds to the database.

string

Indicates whether the scaling group removes the security groups in the associated database list from the database security group whitelist. This setting takes effect only when the AttachMode parameter in the CreateScalingGroup API is set to SecurityGroup. Valid values:

  • true: The security groups in this list are removed from the database security group whitelist.

  • false: The security groups in this list are not removed from the database security group whitelist.

sg-uf65zt66cf2a0q47***

SpotCapacity

integer

The number of spot instances in the scaling group.

0

StopInstanceTimeout

integer

The timeout period, in seconds, to wait for an ECS instance to stop successfully during a scale-in flow.

60

CapacityOptions

object

Capacity options.

OnDemandBaseCapacity

integer

The minimum number of on-demand instances required in an existing scaling group. When the number of on-demand instances in the scaling group is less than this value, the system prioritizes creating on-demand instances. Valid values: 0 to 1000.

0

OnDemandPercentageAboveBaseCapacity

integer

The percentage of on-demand instances among the instances exceeding the minimum number of on-demand instances (OnDemandBaseCapacity) required by the scaling group. Valid values: 0 to 100.

0

CompensateWithOnDemand

boolean

When MultiAZPolicy is set to COST_OPTIMIZED, specifies whether the system is allowed to automatically attempt to create on-demand instances to meet the required number of ECS instances if it cannot create enough spot instances due to factors such as price or inventory. Valid values:

  • true: Allowed.

  • false: Not allowed.

true

SpotAutoReplaceOnDemand

boolean

When CompensateWithOnDemand is enabled, if the proportion of on-demand instances exceeds the OnDemandPercentageAboveBaseCapacity threshold, the system attempts to replace excess on-demand capacity with Spot instances. This is commonly used in scenarios where CompensateWithOnDemand causes a fallback from Spot to on-demand instances due to Spot inventory or pricing issues. To prevent on-demand instances from remaining active for extended periods, the system tries to replace surplus on-demand capacity with Spot instances. Valid values:

  • true: Allowed.

  • false: Not allowed.

false

PriceComparisonMode

string

The price comparison mode for the scaling group's cost optimization policy. Valid values:

  • PricePerUnit: Compares prices based on the price per unit of capacity.

    The capacity contribution of an instance in the scaling group equals the weight assigned to its instance type, which defaults to 1 (meaning one ECS instance contributes a capacity of 1).

  • PricePerVCpu: Compares prices based on the price per vCPU.

Default value: PricePerUnit.

PricePerUnit

BalanceMode

string

Zone balance mode, which takes effect only when zone balance mode is enabled. Valid values:

  • BalancedBestEffort: If resource creation fails in a zone, the system degrades to other zones to ensure best-effort delivery of resources.

  • BalancedOnly: If resource creation fails in a zone, the system does not degrade to other zones. The scale-out activity is partially successful to prevent excessive imbalance of resources across different zones.

BalancedBestEffort

AutoRebalance

boolean

Specifies whether to enable automatic rebalancing for the scaling group. This setting takes effect only when BalancedOnly is enabled for a zone-balanced scaling group. Valid values:

  • false: Disables automatic rebalancing for the scaling group.

  • true: Enables automatic rebalancing. When enabled, the scaling group automatically monitors capacity distribution across zones and proactively scales in or out in specific zones to rebalance capacity when imbalance is detected.

false

Examples

Success response

JSON format

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 1,
  "ScalingGroups": {
    "ScalingGroup": [
      {
        "VpcId": "vpc-bp1vwnn14rqpyiczj****",
        "CreationTime": "2014-08-14T10:58Z",
        "TotalInstanceCount": 1,
        "ScalingGroupName": "dyrSuvBOtO1dEdIlIbp****",
        "SpotInstancePools": 5,
        "StoppedCapacity": 1,
        "OnDemandPercentageAboveBaseCapacity": 20,
        "ModificationTime": "2014-08-14T10:58Z",
        "MinSize": 1,
        "ScalingGroupId": "asg-bp14wlu85wrpchm0****",
        "CompensateWithOnDemand": true,
        "ScalingPolicy": "recycle",
        "RemovingWaitCapacity": 1,
        "ActiveCapacity": 1,
        "OnDemandBaseCapacity": 30,
        "ProtectedCapacity": 1,
        "HealthCheckType": "ECS",
        "LifecycleState": "Active",
        "GroupDeletionProtection": true,
        "ActiveScalingConfigurationId": "asc-bp1et2qekq3ojr33****",
        "GroupType": "ECS",
        "MultiAZPolicy": "PRIORITY",
        "RemovingCapacity": 0,
        "PendingWaitCapacity": 1,
        "StandbyCapacity": 1,
        "PendingCapacity": 0,
        "LaunchTemplateId": "lt-m5e3ofjr1zn1aw7****",
        "TotalCapacity": 1,
        "DesiredCapacity": 5,
        "SpotInstanceRemedy": true,
        "LaunchTemplateVersion": "Default",
        "RegionId": "cn-qingdao",
        "VSwitchId": "vsw-bp1whw2u46cn8zubm****",
        "MaxSize": 2,
        "DefaultCooldown": 60,
        "VServerGroups": {
          "VServerGroup": [
            {
              "LoadBalancerId": "147b46d767c-cn-qingdao-cm5****",
              "VServerGroupAttributes": {
                "VServerGroupAttribute": [
                  {
                    "VServerGroupId": "rsp-bp12bjrny****",
                    "Weight": 1,
                    "Port": 22
                  }
                ]
              }
            }
          ]
        },
        "LaunchTemplateOverrides": {
          "LaunchTemplateOverride": [
            {
              "WeightedCapacity": 4,
              "InstanceType": "ecs.c5.xlarge",
              "SpotPriceLimit": 0.025
            }
          ]
        },
        "AlbServerGroups": {
          "AlbServerGroup": [
            {
              "AlbServerGroupId": "sgp-ddwb0y0g6y9bjm****",
              "Weight": 100,
              "Port": 80
            }
          ]
        },
        "ServerGroups": {
          "ServerGroup": [
            {
              "ServerGroupId": "sgp-i9ouakeaerr*****",
              "Type": "ALB",
              "Weight": 100,
              "Port": 80
            }
          ]
        },
        "RemovalPolicies": {
          "RemovalPolicy": [
            "OldestScalingConfiguration"
          ]
        },
        "DBInstanceIds": {
          "DBInstanceId": [
            "rm-bp15556qzebg1****"
          ]
        },
        "LoadBalancerIds": {
          "LoadBalancerId": [
            "lb-bp19byhscefk3x0li****"
          ]
        },
        "VSwitchIds": {
          "VSwitchId": [
            "vsw-bp1whw2u46cn8zubm****"
          ]
        },
        "SuspendedProcesses": {
          "SuspendedProcess": [
            "ScaleIn"
          ]
        },
        "SystemSuspended": true,
        "MonitorGroupId": "1497****",
        "AzBalance": false,
        "AllocationStrategy": "priority",
        "SpotAllocationStrategy": "lowestPrice",
        "MaxInstanceLifetime": 0,
        "CustomPolicyARN": "acs:fc:cn-zhangjiakou:16145688****:services/ess_custom_terminate_policy.LATEST/functions/ess_custom_terminate_policy_name",
        "InitCapacity": 0,
        "ResourceGroupId": "rg-123****",
        "LoadBalancerConfigs": {
          "LoadBalancerConfig": [
            {
              "LoadBalancerId": "147b46d767c-cn-qingdao-cm5****",
              "Weight": 10
            }
          ]
        },
        "EnableDesiredCapacity": false,
        "Tags": {
          "Tag": [
            {
              "TagKey": "Department",
              "TagValue": "Finance",
              "Propagate": false
            }
          ]
        },
        "HealthCheckTypes": {
          "HealthCheckType": [
            "ECS"
          ]
        },
        "DBInstances": {
          "DBInstance": [
            {
              "DBInstanceId": "rm-m5eqju85s45mu0***",
              "Type": "RDS",
              "SecurityGroupIds": {
                "SecurityGroupId": [
                  "sg-uf65zt66cf2a0q47***"
                ]
              }
            }
          ]
        },
        "SpotCapacity": 0,
        "StopInstanceTimeout": 60,
        "CapacityOptions": {
          "OnDemandBaseCapacity": 0,
          "OnDemandPercentageAboveBaseCapacity": 0,
          "CompensateWithOnDemand": true,
          "SpotAutoReplaceOnDemand": false,
          "PriceComparisonMode": "PricePerUnit"
        },
        "BalanceMode": "BalancedBestEffort",
        "AutoRebalance": false
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.