Enables a scaling group.
Operation description
You can call this operation to enable a scaling group that is in the Inactive state and has an instance configuration source. The instance configuration source can be a scaling configuration, a launch template, or an Elastic Compute Service (ECS) instance that you specified when you created the scaling group. If a scaling group is not in the Inactive state or does not have an active instance configuration source, you cannot call this operation to enable the scaling group.
If you specify a value for the InstanceIds parameter when you call the operation, Auto Scaling checks whether the total number of ECS instances is within the range allowed in the scaling group after you call the operation.
- If the total number of ECS instances is less than the minimum number of instances required in the scaling group after you call the operation, Auto Scaling automatically creates the required number of pay-as-you-go ECS instances and adds the instances to the scaling group to reach the minimum number. For example, if the minimum number of instances required in your scaling group is five, and you specify the InstanceIds parameter to add two ECS instances to the scaling group, Auto Scaling automatically creates three instances in the scaling group after the two instances are added.
- If the value of the TotalCapacity parameter is greater than the value of the MaxSize parameter, the call fails.
Debugging
Authorization information
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 put into the Active state. | asc-bp1ffogfdauy0nu5**** |
LaunchTemplateId | string | No | The ID of the launch template that is used by Auto Scaling 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 ECS instances that you want to add to the scaling group after you enable the scaling group. The ECS instances must meet the following requirements:
| |
string | No | The IDs of ECS instances that you want to add to the scaling group after you enable the scaling group. The ECS instances must meet the following requirements:
| i-283vv**** | |
LoadBalancerWeights | array | No | The weight of an ECS instance as a backend server in the backend vServer group. Default value: 50. | |
integer | No | The weight of an ECS instance as a backend server in the backend vServer group. Default value: 50. | 50 | |
LaunchTemplateOverrides | object [] | No | Details of the instance types that you specify by using the Extended Configurations feature of the launch template. | |
InstanceType | string | No | The instance type that you want to use to override the instance type that is specified in the launch template. If you want to scale instances based on the weighted capacities of the instances, you must specify both the InstanceType and WeightedCapacity parameters. Note
This parameter is supported only if you specify the LaunchTemplateId parameter.
You can specify an instance type that is available for purchase as the value of the InstanceType parameter. | ecs.c5.xlarge |
WeightedCapacity | integer | No | The weight of the instance type. The weight specifies the capacity of a single instance of the specified instance type in the scaling group. If you want to scale instances based on the weighted capacities of the instances, you must specify the WeightedCapacity parameter after you specify the InstanceType parameter. A higher weight specifies that a smaller number of instances of the specified instance type are required to meet the expected capacity requirement. Performance metrics, such as the number of vCPUs and the memory size of each instance type, may vary. You can specify different weights for different instance types based on your business requirements. Example:
To meet the expected capacity requirement, Auto Scaling must create and add two ecs.c5.xlarge instances. Note
The capacity of the scaling group cannot exceed the sum of the maximum number of instances that is specified by the MaxSize parameter and the maximum weight of the instance types.
Valid values of the WeightedCapacity parameter: 1 to 500. | 4 |
RegionId | string | No | The region ID of the scaling group. | cn-qingdao |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|