This topic describes the common operations of Auto Scaling.
Create scaling groups
The first time you use Auto Scaling, you can perform the operations described in the following table.
Item | Documentation | API reference | Description |
---|---|---|---|
Scaling group | - | CreateScalingGroup | You can create a scaling group to manage a group of instances based on your business requirements. |
Scaling configuration | If you do not specify the instance configuration source when you create a scaling group, you must create a scaling configuration. A scaling group can contain Elastic Compute Service (ECS) instances or elastic container instances. | ||
Scaling rule | Create a scaling rule | CreateScalingRule | You can create a scaling rule to specify the number of instances that are added or removed during scaling activities. You can also create a scaling rule to configure the minimum and maximum numbers of instances in a scaling group. |
Lifecycle hook | Create lifecycle hooks | CreateLifecycleHook | You can create lifecycle hooks for scaling groups and switch instances in the scaling groups to the Pending Add or Pending Remove state. Lifecycle hooks provide a period of time in which you can perform operations on the instances until the lifecycle hooks time out. |
Scheduled task | Create a scheduled task | CreateScheduledTask | You can create a scheduled task to scale instances within a specified time period. |
Event-triggered task | Create event-triggered tasks | CreateAlarm | You can create an event-triggered task to dynamically scale instances based on the specified metrics. |
View scaling groups
If you want to query the details of scaling groups, instances, scaling rules, event-triggered tasks, and scaling activities, you can perform the operations described in the following table.
Item | Documentation | API reference | Description |
---|---|---|---|
Scaling group | View scaling groups | DescribeScalingGroups | You can query the basic configurations of the existing scaling groups. |
Instance list | - | DescribeScalingInstances | You can query information about instances in a scaling group. |
Scaling rule | View the prediction effect of a predictive scaling rule | None. | You can check whether the prediction based on a predictive scaling rule meets your expectations so that you can determine whether to make adjustments. |
Event-triggered task | View event-triggered tasks | DescribeAlarms | You can view the basic information, trigger rules, and monitoring information of an event-triggered task. Then, you can understand the configurations of the event-triggered task and the data trend of metrics. |
Scaling activity | View the details of a scaling activity | If a scaling activity is triggered by a scheduled or event-triggered task, you can view the details of the scaling activity to check its execution result. | |
Scaling group monitoring | None. |
|
Manage scaling groups
If you want to manage scaling groups, instances, scaling configurations, scaling rules, scheduled tasks, and event-triggered tasks, you can perform the operations described in the following table.
Item | Documentation | API reference | Description |
---|---|---|---|
Scaling group | Suspend and resume scaling processes |
| |
Instance list |
| ||
Scaling configuration | Manage scaling configurations | None. |
|
Scaling rule | Execute a scaling rule | None. | You can execute scaling rules for manual or automatic scaling. |
Scheduled task | Enable or disable a scheduled task | None. | If you want to reuse a scheduled task that is in the Disabled state, you can enable the scheduled task again and execute the scheduled task during the specified time range. You can disable scheduled tasks that are not currently required. |
Event-triggered task | Disable or enable event-triggered tasks | If you want to reuse an event-triggered task that is in the Disabled state, you can enable the event-triggered task again. You can disable event-triggered tasks that are not currently required. |
Modify scaling groups
Item | Documentation | API reference | Description |
---|---|---|---|
Scaling group | Modify scaling groups | ModifyScalingGroup | If your scaling group cannot meet your business requirements, you can simply modify the parameter settings of the scaling group. |
Scaling configuration |
| ||
Scaling rule | Modify a scaling rule | ModifyScalingRule | If your scaling rule no longer meets your business requirements, you can simply modify the parameter settings of the scaling rule. |
Lifecycle hook | Modify a lifecycle hook | ModifyLifecycleHook | If your lifecycle hook no longer meets your business requirements, you can simply modify the parameter settings of the lifecycle hook. |
Scheduled task | Modify a scheduled task | ModifyScheduledTask | If your scheduled task no longer meets your business requirements, you can simply modify the parameter settings of the scheduled task. |
Event-triggered task | Modify an event-triggered task | ModifyAlarm | If your event-triggered task no longer meets your business requirements, you can simply modify the parameter settings of the event-triggered task. You can modify the trigger rules for event-triggered tasks. You can also add multiple trigger rules or delete all existing trigger rules. |
Delete scaling groups
Item | Documentation | API reference | Description |
---|---|---|---|
Scaling group | - | DeleteScalingGroup | When you delete scaling groups, the scaling configurations and scaling rules in the scaling groups are also deleted. You can delete scaling groups that you no longer require to free up more quota. |
Instance list | - | You can manually delete instances or remove instances that you no longer require from scaling groups. | |
Scaling configuration | Delete a scaling configuration | You can delete scaling configurations that you no longer require to free up more quota. | |
Scaling rule | Delete a scaling rule | DeleteScalingRule | You can delete scaling rules that you no longer require to free up more quota. |
Lifecycle hook | Delete a lifecycle hook | DeleteLifecycleHook | You can delete lifecycle hooks that you no longer require to free up more quota. |
Scheduled task | Delete a scheduled task | DeleteScheduledTask | You can delete scheduled tasks that you no longer require. |
Event-triggered task | Delete an event-triggered task | DeleteAlarm | You can delete event-triggered tasks that you no longer require. |