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 a lifecycle hook 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.
  • The scaling group monitoring feature allows you to view the changes in the number of instances in different states in a scaling group. This allows you to obtain resource utilization of the scaling group over a specified period of time.
  • You can use the scaling group monitoring feature to view metrics such as the CPU utilization, memory usage, loads, system disk read/write, and network bandwidth of all Elastic Compute Service (ECS) instances in your scaling group. This allows you to obtain the utilization of resources in the scaling group within a month.

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
  • You can resume a suspended process in a scaling group. This allows the scaling group to continue the specified process based on the functional logic of the scaling group. You can suspend a process in a scaling group. Then, you can perform other operations based on your business requirements.
  • You can scale instances only when scaling groups are in the Enabled state. You can disable a scaling group that is not currently required.
Instance list
  • To maximize the utilization of existing computing resources, you can manually add existing instances to your scaling group.
  • You can manually switch the status of instances from one state to another state based on your business requirements. For example, you can put an instance that you no longer require into the Standby state, move an instance that is in the Standby state out of the Standby state, or put an instance that you do not want to remove from your scaling group into the Protected state. If the Instance Reclaim Mode parameter of your scaling group is set to Economical Mode, you can manually put the instance into the Stopped state.
  • If instances are not evenly distributed across multiple zones due to insufficient resources, you can use Balanced Distribution Policy to re-distribute instances across zones.
Scaling configuration Manage scaling configurations None.
  • After you apply a scaling configuration, Auto Scaling creates instances based on the scaling configuration when a scale-out activity is triggered.
  • You can export scaling configurations to back them up on a local disk, or import them to other scaling groups.
  • You can import the scaling configurations of a scaling group to another scaling group. This saves your time to create scaling configurations.
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
  • You can modify scaling configurations to meet your specific requirements.
  • Images in scaling configurations are frequently updated to meet business requirements. You can manually modify the images in a single scaling configuration to meet your specific requirements.
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.