Enables a scaling group that is in the Disabled state and has an instance configuration source, such as a launch template or scaling configuration. After the scaling group is enabled, Auto Scaling dynamically adjusts the number of instances based on your business requirements.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:EnableScalingGroup |
update |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ScalingGroupId |
string |
Yes |
The ID of the scaling group. |
asg-bp14wlu85wrpchm0**** |
| ActiveScalingConfigurationId |
string |
No |
The ID of the scaling configuration that you want to enable in the scaling group. |
asc-bp1ffogfdauy0nu5**** |
| LaunchTemplateId |
string |
No |
The ID of the launch template used to create ECS instances. |
lt-m5e3ofjr1zn1aw7**** |
| LaunchTemplateVersion |
string |
No |
The version number of the launch template. Valid values:
|
Default |
| InstanceIds |
array |
No |
The IDs of the ECS instances that you want to add to the scaling group after the scaling group is enabled. Before you add ECS instances to the scaling group, make sure that the instances meet the following requirements:
|
|
|
string |
No |
The ID of the ECS instance that you want to add to the scaling group after the scaling group is enabled. Before you add an ECS instance to the scaling group, make sure that the instance meets the following requirements:
|
i-283vv**** |
|
| LoadBalancerWeights |
array |
No |
The weights of ECS instances or elastic container instances as backend servers. Default value: 50. |
|
|
integer |
No |
The weight of an ECS instance or elastic container instance as a backend server. Default value: 50. |
50 |
|
| LaunchTemplateOverrides |
array<object> |
No |
The instance types to extend in the launch template. |
|
|
object |
No |
Details of the instance types specified in the extended launch template configurations. |
||
| InstanceType |
string |
No |
The instance type. To scale instances based on instance type weights, you must also specify This parameter overwrites the instance type specified in the launch template. Note
This parameter takes effect only if you specify LaunchTemplateId. You can use this parameter to specify any instance type available for purchase. |
ecs.c5.xlarge |
| WeightedCapacity |
integer |
No |
The weight of the instance type. To scale instances based on instance type weights, specify this parameter together with The weight represents the capacity of a single instance of the specified type in the scaling group. A higher weight means fewer instances are needed to meet the expected capacity. Because performance metrics such as vCPUs and memory vary by instance type, you can assign different weights to match your business requirements. Example:
To reach the expected capacity, Auto Scaling must scale out two instances of ecs.c5.xlarge. Note
The scaling group capacity cannot exceed the sum of MaxSize and the maximum weight among all instance types. Valid values of WeightedCapacity: 1 to 500. |
4 |
| RegionId |
string |
No |
The region ID of the scaling group. |
cn-qingdao |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.