DescribeScalingGroups

Updated at:

Queries the details of a scaling group, including its basic information, instances, and scaling configurations.

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 ID of the region where the scaling group resides.

cn-qingdao

PageNumber

integer

No

The page number of the scaling group list. Pages start from 1.

Default value: 1.

1

PageSize

integer

No

The number of entries to return on each page in the paging Settings for a paged query. 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 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.2

string

No

ScalingGroupName.2 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.3

string

No

ScalingGroupName.3 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.4

string

No

ScalingGroupName.4 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.5

string

No

ScalingGroupName.5 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.6

string

No

ScalingGroupName.6 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.7

string

No

ScalingGroupName.7 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.8

string

No

ScalingGroupName.8 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.9

string

No

ScalingGroupName.9 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.10

string

No

ScalingGroupName.10 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.11

string

No

ScalingGroupName.11 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.12

string

No

ScalingGroupName.12 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.13

string

No

ScalingGroupName.13 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.14

string

No

ScalingGroupName.14 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.15

string

No

ScalingGroupName.15 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.16

string

No

ScalingGroupName.16 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.17

string

No

ScalingGroupName.17 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.18

string

No

ScalingGroupName.18 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.19

string

No

ScalingGroupName.19 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

scalinggroup****

ScalingGroupName.20

string

No

ScalingGroupName.20 specifies the name of the scaling group to query. Invalid scaling group names are ignored in the query results and no error is returned.

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

ScalingGroupId.N specifies the ID of the scaling group to query. 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

ScalingGroupId.N specifies the ID of the scaling group to query. 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 to be queried belongs.

Note

If no scaling group belongs to the specified resource group, the query result is empty 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 scaling group information.

array<object>

The scaling group information.

VpcId

string

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

vpc-bp1vwnn14rqpyiczj****

CreationTime

string

The time when the scaling group was created. The time is displayed in UTC and follows the ISO 8601 standard.

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 available instance types that are specified. The scaling group creates spot instances based on the most cost-effective instance types in a balanced manner. Valid values: 0 to 10. Default value: 2 when the MultiAZPolicy parameter is set to COMPOSABLE.

5

StoppedCapacity

integer

The number of instances in the scaling group that are in the economical mode.

1

OnDemandPercentageAboveBaseCapacity

integer

The percentage of pay-as-you-go instances out of the instances that exceed the minimum number of pay-as-you-go instances specified by OnDemandBaseCapacity. Valid values: 0 to 100. Default value: 100 when the MultiAZPolicy parameter is set to COMPOSABLE.

20

ModificationTime

string

The time when the scaling group was modified. The time is displayed in UTC and follows the ISO 8601 standard.

2014-08-14T10:58Z

MinSize

integer

The minimum number of ECS instances in the scaling group.

1

ScalingGroupId

string

The ID of the scaling group.

asg-bp14wlu85wrpchm0****

CompensateWithOnDemand

boolean

Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances when the MultiAZPolicy parameter is set to COST_OPTIMIZED and sufficient spot instances cannot be created due to price or inventory constraints. Valid values:

  • true: Yes.

  • false: No.

true

ScalingPolicy

string

The reclaim mode of the scaling group. Valid values:

  • recycle: The scaling group uses the shutdown and reclaim mode.

  • release: The scaling group uses the release mode.

  • forcerelease: The scaling group uses the force release mode. For more information about the actions on removed instances, see RemoveInstances.

recycle

RemovingWaitCapacity

integer

The number of ECS instances that are pending removal in the scaling group.

1

ActiveCapacity

integer

The number of ECS instances that have been added to the scaling group and are running properly.

1

OnDemandBaseCapacity

integer

The minimum number of pay-as-you-go instances required in the scaling group. Valid values: 0 to 1000. When the number of pay-as-you-go instances in the scaling group is less than this value, the system preferentially creates pay-as-you-go instances. Default value: 0 when the MultiAZPolicy parameter is set to COMPOSABLE.

30

ProtectedCapacity

integer

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

1

HealthCheckType

string

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

  • NONE: No health check is performed.

  • ECS: Health checks are performed on instances in the scaling group. This value is used to enable instance health checks for both ECS and ECI scaling groups.

  • LOAD_BALANCER: The health status of instances is determined based on the health check results of load balancing (the CLB load balancing type is not currently supported).

ECS

LifecycleState

string

The lifecycle state of the scaling group. Valid values:

  • Active: The scaling group is active. Only active scaling groups can accept requests to execute scaling rules and trigger a scaling activity.

  • Inactive: The scaling group is inactive. Inactive scaling groups do not accept any requests to execute scaling rules.

  • Deleting: The scaling group is being deleted. Scaling groups in the Deleting state do not accept any requests to execute scaling rules, and their parameters cannot be modified.

Active

GroupDeletionProtection

boolean

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

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

  • false: Deletion protection is disabled.

true

ActiveScalingConfigurationId

string

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

asc-bp1et2qekq3ojr33****

GroupType

string

The type of instances managed by the scaling group.

ECS

MultiAZPolicy

string

The scale-out and scale-in policy for ECS instances in a multi-zone scaling group. Valid values:

  • PRIORITY: Scales instances based on the vSwitches specified by VSwitchIds.N. If ECS instances cannot be created in the active zone of the vSwitch with the highest priority, the system automatically uses the vSwitch with the next highest priority to create ECS instances.

  • COST_OPTIMIZED: Attempts to create instances based on the unit price of vCPUs in ascending order. When the scaling configuration settings specify multiple instance types that use the preemptible billing method, the system preferentially creates spot instances. You can use the CompensateWithOnDemand parameter to specify whether to automatically create pay-as-you-go instances when spot instances cannot be created due to inventory shortages.

Note

COST_OPTIMIZED takes effect only when the scaling configuration settings specify multiple instance types or use spot instances.

  • BALANCE: Evenly allocate ECS instances across the active zones specified for the scaling group. If the distribution becomes unbalanced due to inventory shortages, you can call the RebalanceInstance operation to balance the resources.

  • COMPOSABLE: A composite policy that allows you to combine the preceding multi-zone scale-out and scale-in policies as needed.

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 scaling group that are in the Pending Wait state.

1

StandbyCapacity

integer

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

1

PendingCapacity

integer

The number of ECS instances that are being added to the scaling group but have not completed the related configurations.

0

LaunchTemplateId

string

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

lt-m5e3ofjr1zn1aw7****

TotalCapacity

integer

The total weighted capacity of all ECS instances in the scaling group if instance type weights are configured. Otherwise, this parameter indicates the total number of ECS instances in the scaling group.

1

DesiredCapacity

integer

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

5

SpotInstanceRemedy

boolean

Indicates whether the spot instance replenishment feature is enabled. After this feature is enabled, when the scaling group receives a system message indicating that a preemptible instance will be reclaimed, the scaling group attempts to create a new instance to replace the preemptible instance to be reclaimed.

true

LaunchTemplateVersion

string

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

Default

RegionId

string

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

cn-qingdao

VSwitchId

string

The ID of the vSwitch associated with the scaling group.

vsw-bp1whw2u46cn8zubm****

MaxSize

integer

The maximum number of ECS instances in the scaling group.

2

DefaultCooldown

integer

The default cooldown time of the scaling group. During the cooldown time, the scaling group does not execute any other scaling activity. This parameter applies only to the scaling activity triggered by CloudMonitor event-triggered tasks.

60

VServerGroups

object

VServerGroup

array<object>

The list of backend server groups.

array<object>

The list of backend server groups.

LoadBalancerId

string

The ID of the load balancing instance to which the backend server group belongs.

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

VServerGroupAttributes

object

VServerGroupAttribute

array<object>

The attributes of the backend server group.

object

The attributes of the backend server group.

VServerGroupId

string

The ID of the backend server group.

rsp-bp12bjrny****

Weight

integer

The weight of the backend server group.

1

Port

integer

The port number used by the load balancing instance to provide services.

22

LaunchTemplateOverrides

object

LaunchTemplateOverride

array<object>

The instance type information that extends the launch template.

object

The instance type information that extends the launch template.

WeightedCapacity

integer

The weight of the specified instance type, which indicates the capacity that a single instance of this type represents in the scaling group. A higher weight means fewer instances of this type are required to meet the expected capacity.

4

InstanceType

string

The specified instance type, which overrides the instance type in the launch template.

ecs.c5.xlarge

SpotPriceLimit

number

The maximum hourly price for the instance type specified in the launch template override (LaunchTemplateOverride.N.InstanceType). You can specify N instances of this parameter to extend the launch template to support N instance types. Valid values of N: 1 to 10.

Note

This parameter takes effect only when the LaunchTemplateId parameter is specified.

0.025

AlbServerGroups

object

AlbServerGroup

array<object>

The collection of information about the ALB server groups.

object

The collection of information about the ALB server groups.

AlbServerGroupId

string

The ID of the ALB server group.

sgp-ddwb0y0g6y9bjm****

Weight

integer

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

100

Port

integer

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

80

ServerGroups

object

ServerGroup

array<object>

The collection of information about the load balancing server groups.

Note

You can use this parameter to obtain the collection of information about the ALB service group, NLB server group, and GWLB service group associated with the scaling group.

object

The collection of information about the load balancing server groups.

ServerGroupId

string

The ID of the server group.

sgp-i9ouakeaerr*****

Type

string

The type of the server group. Valid values:

  • ALB: Application Load Balancer (ALB), which provides load balancing at the application layer.

  • NLB: Network Load Balancer (NLB), which provides load balancing at the network layer.

  • GWLB: Gateway Load Balancer (GWLB), which provides load balancing at the gateway layer.

ALB

Weight

integer

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

100

Port

integer

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

80

RemovalPolicies

object

RemovalPolicy

array

The policies for removing ECS instances from the scaling group. Valid values:

  • OldestInstance: Removes the ECS instances that were created earliest.

  • NewestInstance: Removes the ECS instances that were created most recently.

  • OldestScalingConfiguration: Removes the ECS instances that were created earliest based on the scaling configuration.

  • CustomPolicy: Removes ECS instances based on a custom scale-in policy function.

string

The policies for removing ECS instances from the scaling group. Valid values:

  • OldestInstance: Removes the ECS instances that were created earliest.

  • NewestInstance: Removes the ECS instances that were created most recently.

  • OldestScalingConfiguration: Removes the ECS instances that were created earliest based on the scaling configuration.

  • CustomPolicy: Removes ECS instances based on a custom scale-in policy function.

OldestScalingConfiguration

DBInstanceIds

object

DBInstanceId

array

The ID of the ApsaraDB RDS instance associated with the scaling group.

string

The ID of the ApsaraDB RDS instance associated with the scaling group.

rm-bp15556qzebg1****

LoadBalancerIds

object

LoadBalancerId

array

The IDs of the load balancing instances associated with the scaling group.

string

The IDs of the load balancing instances associated with the scaling group.

lb-bp19byhscefk3x0li****

VSwitchIds

object

VSwitchId

array

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

string

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

vsw-bp1whw2u46cn8zubm****

SuspendedProcesses

object

SuspendedProcess

array

The suspended processes. If no process is suspended, an empty value is returned. Valid values:

  • ScaleIn: The scale-in process.

  • ScaleOut: The scale-out process.

  • HealthCheck: The health check process.

  • AlarmNotification: The event-triggered task process.

  • ScheduledAction: The scheduled task process.

string

The suspended processes. If no process is suspended, an empty value is returned. Valid values:

  • ScaleIn: The scale-in process.

  • ScaleOut: The scale-out process.

  • HealthCheck: The health check process.

  • AlarmNotification: The event-triggered task process.

  • ScheduledAction: The scheduled task process.

ScaleIn

SystemSuspended

boolean

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

  • true: Auto Scaling stops executing any scaling activity in the scaling group. This indicates that the scaling group has failed to execute scale-out or scale-in activities for more than 7 consecutive days. You must modify the scaling group or scaling configuration to recover the execution of the scaling activity.

  • false: Auto Scaling executes the scaling activity in the scaling group.

true

MonitorGroupId

string

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

1497****

AzBalance

boolean

Indicates whether the capacity of the scaling group is evenly distributed across multiple zones. Valid values:

  • true: The capacity of the scaling group is evenly distributed across multiple zones.

  • false: The capacity of the scaling group is not evenly distributed across multiple zones.

Note

This parameter takes effect only when the MultiAZPolicy parameter is set to COMPOSABLE.

false

AllocationStrategy

string

The capacity allocation policy, which determines how the scaling group selects available instance types to meet the capacity requirements. The capacity distribution policy applies to both pay-as-you-go and preemptible capacities. Valid values:

  • priority: Creates instances in the order of the configured instance types.

  • lowestPrice: Creates instances based on the unit price of vCPUs in ascending order.

Note

This parameter takes effect only when the MultiAZPolicy parameter is set to COMPOSABLE.

priority

SpotAllocationStrategy

string

The preemptible capacity distribution policy. You can use this parameter to specify the distribution policy for preemptible capacity separately. This parameter takes effect only when the MultiAZPolicy parameter is set to COMPOSABLE. Valid values:

  • priority: Creates instances in the order of the configured instance types.

  • lowestPrice: Creates instances based on the unit price of vCPUs in ascending order.

lowestPrice

MaxInstanceLifetime

integer

The maximum lifetime of an instance in the scaling group. Unit: seconds. Valid values: 0 or [86400, Integer.maxValue]. A value of 0 indicates that the MaxInstanceLifetime value is cleared, which means MaxInstanceLifetime is not set. Default value: null. > This parameter is not supported for scaling groups of the Elastic Container Instance (ECI) type or scaling groups that have the No Fees for Stopped Instances feature enabled.

86400

CustomPolicyARN

string

The Alibaba Cloud Resource Name (ARN) of the Function Compute function for the custom scale-in policy. This parameter takes effect only when the first removal policy in RemovalPolicies is set to CustomPolicy.

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

InitCapacity

integer

The number of instances in the initialization state before scale-out in the scaling group.

0

ResourceGroupId

string

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

rg-123****

LoadBalancerConfigs

object

LoadBalancerConfig

array<object>

The Classic Load Balancer (CLB) load balancing configurations.

object

The Classic Load Balancer (CLB) load balancing configurations.

LoadBalancerId

string

The ID of the Classic Load Balancer (CLB) load balancing instance.

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

Weight

integer

The weight of the ECS instance as a backend server after Auto Scaling adds the ECS instance to the CLB load balancing server group. A higher weight indicates that more access requests are allocated to the ECS instance. If the weight is 0, the ECS instance does not receive access requests. Valid values: 0 to 100.

10

EnableDesiredCapacity

boolean

Specifies whether to enable the expected number of instances. Valid values:

  • true: Enabled. The expected number of instances is returned after you query the scaling group.

  • false: Disabled. The expected number of instances is not returned after you query the scaling group.

false

Tags

object

Tag

array<object>

The tags of the scaling group.

object

The tags of 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

Specifies whether the tag is a propagated tag. Valid values:

  • true: Tags on the scaling group are propagated only to newly created instances, but not to instances that are already running in the scaling group.

  • false: Tags on the scaling group are not propagated to instances. Default value: false.

false

HealthCheckTypes

object

HealthCheckType

array

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

  • NONE: No health check is performed.

  • ECS: Health checks are performed on instances in the scaling group. This value is used to enable instance health checks for both ECS and ECI scaling groups.

  • LOAD_BALANCER: The health status of instances is determined based on the load balancing health check results (the CLB load balancing type is not supported).

string

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

  • NONE: No health check is performed.

  • ECS: Health checks are performed on instances in the scaling group. This value is used to enable instance health checks for both ECS and ECI scaling groups.

  • LOAD_BALANCER: The health status of instances is determined based on the load balancing health check results (the CLB load balancing type is not supported).

ECS

DBInstances

object

DBInstance

array<object>

The databases associated with the scaling group.

array<object>

The configuration information of the database 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 security group whitelist added to the database by the scaling group.

string

Specifies whether the scaling group removes the security groups in the associated database list from the database security group whitelist. This parameter is valid for the associated database list only when the AttachMode parameter in the CreateScalingGroup operation is set to SecurityGroup. Valid values:

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

  • false: The security groups in the 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 for waiting for an ECS instance to be stopped during the scale-in process. Unit: seconds.

60

CapacityOptions

object

The capacity options.

OnDemandBaseCapacity

integer

The minimum number of pay-as-you-go instances required in the scaling group. If the number of pay-as-you-go instances in the scaling group is less than this value, the system preferentially creates pay-as-you-go instances. Valid values: 0 to 1000.

0

OnDemandPercentageAboveBaseCapacity

integer

The percentage of pay-as-you-go instances in the excess instances after the scaling group meets the minimum number of pay-as-you-go instances specified by OnDemandBaseCapacity. Valid values: 0 to 100.

0

CompensateWithOnDemand

boolean

Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances when the MultiAZPolicy parameter is set to COST_OPTIMIZED and sufficient spot instances cannot be created due to price or inventory constraints. Valid values:

  • true: Yes.

  • false: No.

true

SpotAutoReplaceOnDemand

boolean

Specifies whether to use spot instances to replace pay-as-you-go capacity when the percentage of pay-as-you-go instances exceeds the value of OnDemandPercentageAboveBaseCapacity after CompensateWithOnDemand is enabled. In common scenarios where CompensateWithOnDemand downgrades spot instances to pay-as-you-go instances due to spot instance inventory or price reasons, this feature attempts to use spot instances to replace the excess pay-as-you-go capacity to avoid long-term retention of pay-as-you-go instances. Valid values:

  • true: Allowed.

  • false: Not allowed.

false

PriceComparisonMode

string

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

  • PricePerUnit: Compares prices based on the price per unit of capacity. The capacity of an instance in the scaling group is equal to the weight set for the instance type. The default weight is 1, which means one ECS instance occupies one unit of capacity.

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

PricePerUnit

BalanceMode

string

The zone balancing mode. This parameter takes effect only when the zone balancing 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 partially succeeds to avoid excessive imbalance of resources across different zones.

BalancedBestEffort

AutoRebalance

boolean

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

  • false: Automatic rebalancing is disabled.

  • true: Automatic rebalancing is enabled. The scaling group automatically detects the capacity across zones. If the capacity is unbalanced, the scaling group proactively scales out or in to rebalance the capacity across zones.

false

WarmPoolCapacity

integer

The number of instances in the warm pool.

5

WarmPoolConfiguration

object

The current warm pool configuration of the scaling group.

Status

string

The status of the warm pool. Valid values:

  • Active: Active.

  • Deleting: Deleting.

Active

CapacityOptions

object

The capacity configuration of the warm pool.

MinCapacity

integer

The minimum number of instances in the warm pool. The system always retains no less than this number of pre-warmed instances in the warm pool to ensure rapid scale-out from the warm pool at any time.

0

DesiredGroupPreparedCapacity

integer

The expected number of instances covered by pre-warming. The system maintains the sum of the current number of instances in the scaling group and the number of instances in the warm pool at this value.

5

PoolState

string

The state of instances in the warm pool. Valid values:

  • Running: The instances are running. This state enables faster scale-out, but you are charged for the full cost of the instances.

  • Stopped: The instances are in the economical mode. You are charged only for resources such as cloud disks, elastic IP addresses (EIPs), and snapshots of the instances. However, instance startup may fail due to insufficient inventory during scale-out.

Running

InstanceReusePolicy

object

The instance reuse policy.

ReuseOnScaleIn

boolean

Specifies whether instances are returned to the warm pool when the scaling group scales in.

true

InstanceStartFailurePolicy

string

The action to take on an instance if it fails to start during scale-out. Valid values:

  • release: Releases the instance that failed to start.

  • retain: Retains the instance that failed to start in the stopped state in the scaling group. The system will attempt to start it again during the next scale-out activity. Note: Stopped instances are counted towards the MaxSize of the scaling group. If the capacity of stopped instances reaches MaxSize, scale-out will not create new instances and will only attempt to start instances from the stopped state, which may cause continuous scale-out failures.

release

ZoneShiftOptions

object

The zone shift options.

ImpairedZoneIds

object

impairedZoneIds

array

The list of impaired zone IDs.

cn-hangzhou-g

string

The list of impaired zone IDs.

cn-hangzhou-g

ExpiryTime

string

The expiration time of the zone shift. After the expiration time, the system automatically ends the current shift and restores the related zones. The time is displayed in UTC and follows the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format.

2026-01-01T12:05Z

ZoneShiftPolicy

object

The behavior policy of the scaling group during the zone shift.

ScaleOutInHealthyZonesOnly

boolean

Specifies whether scale-out creates instances only in healthy zones during the shift. Valid values:

  • true: Scale-out creates instances only in healthy zones and skips impaired zones.

  • false: Scale-out is not restricted by zone and can create instances in any zone under the scaling group.

true

ScaleInBlockedRuleTypes

object

scaleInBlockedRuleTypes

array

The types of scale-in rules blocked during the active shift. Valid values:

  • StepScalingRule: Blocks scale-in triggered by step scaling rules.

  • TargetTrackingScalingRule: Blocks scale-in triggered by target tracking scaling rules.

  • None: Does not block any scale-in rules. This value cannot be used with other values. An empty list also indicates no blocking.

string

The types of scale-in rules blocked during the active shift. Valid values:

  • StepScalingRule: Blocks scale-in triggered by step scaling rules.

  • TargetTrackingScalingRule: Blocks scale-in triggered by target tracking scaling rules.

  • None: Does not block any scale-in rules. This value cannot be used with other values. An empty list also indicates no blocking.

Valid values:

  • TargetTrackingScalingRule :

    Blocks scale-in triggered by target tracking scaling rules.

  • StepScalingRule :

    Blocks scale-in triggered by step scaling rules.

  • None :

    Does not block any scale-in rules. This value cannot be used with other values. An empty list also indicates no blocking.

StepScalingRule

ImpairedZoneHealthCheckBehavior

string

The health check behavior in impaired zones. Valid values:

  • ReplaceUnhealthy: Unhealthy instances in all zones are replaced normally.

  • IgnoreUnhealthy: Unhealthy instances in impaired zones are not replaced. Healthy zones are not affected.

ReplaceUnhealthy

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": 86400,
        "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,
        "WarmPoolCapacity": 5,
        "WarmPoolConfiguration": {
          "Status": "Active",
          "CapacityOptions": {
            "MinCapacity": 0,
            "DesiredGroupPreparedCapacity": 5
          },
          "PoolState": "Running",
          "InstanceReusePolicy": {
            "ReuseOnScaleIn": true
          }
        },
        "InstanceStartFailurePolicy": "release",
        "ZoneShiftOptions": {
          "ImpairedZoneIds": {
            "impairedZoneIds": [
              "cn-hangzhou-g"
            ]
          },
          "ExpiryTime": "2026-01-01T12:05Z",
          "ZoneShiftPolicy": {
            "ScaleOutInHealthyZonesOnly": true,
            "ScaleInBlockedRuleTypes": {
              "scaleInBlockedRuleTypes": [
                "StepScalingRule"
              ]
            },
            "ImpairedZoneHealthCheckBehavior": "ReplaceUnhealthy"
          }
        }
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.