Name |
You cannot change the name of a lifecycle hook after you create the lifecycle hook.
The name must be 2 to 64 characters in length and can contain letters, digits, periods
(.), underscores (_), and hyphens (-). The name must start with a letter or a digit.
|
Scaling Activity |
When scaling activities of the specified type occur, the lifecycle hook is triggered
and the ECS instances enter the pending state. Valid values:
- Scale-in Event
- Scale-out Event
|
Timeout Period |
During the timeout period, ECS instances remain in the pending state. The value of
this parameter must be an integer that ranges from 30 to 21600. Unit: seconds.
Note We recommend that you configure the Timeout Period parameter based on your business
requirements. If the timeout period is shorter than the required period of time, the
system executes the default execution policy.
|
Default Execution Policy |
The action to take after the lifecycle hook times out. Valid values:
- Continue: For scale-out activities, Auto Scaling continues to add ECS instances to the scaling
group. For scale-in activities, Auto Scaling stops ECS instances from providing computing
power in the scaling group.
- Reject: For scale-out activities, Auto Scaling releases ECS instances. For scale-in activities,
Auto Scaling stops ECS instances from providing computing power in the scaling group.
Notice
- If you set Notification Method to OOS Template, the action that is performed after a lifecycle hook times out varies
based on the execution result of the OOS template.
- If the execution is successful, Auto Scaling continues to add ECS instances to the
scaling group for scale-out activities. For scale-in activities, Auto Scaling stops
ECS instances from providing computing power in the scaling group.
- If the execution fails, Auto Scaling releases ECS instances for scale-out activities.
For scale-in activities, Auto Scaling stops ECS instances from providing computing
power in the scaling group.
- The following rules apply when Auto Scaling stops ECS instances from providing computing
power in a scaling group:
- If you set the Instance Reclaim Mode parameter of the scaling group to Release and ECS instances are automatically created, or if you set the Instance Reclaim Mode
parameter of the scaling group to Release, manually create ECS instances, and use
the scaling group to manage the lifecycle of the ECS instances, Auto Scaling removes
the ECS instances from the scaling group during scale-in activities.
- If you set the Instance Reclaim Mode parameter of the scaling group to Economical Mode and ECS instances are automatically created, or if you set the Instance Reclaim Mode
parameter of the scaling group to Economical Mode, manually create ECS instances,
and use the scaling group to manage the lifecycle of the ECS instances, Auto Scaling
stops the ECS instances during scale-in activities but retains some resources. For
more information, see Create a scaling group.
- If you manually create ECS instances and do not use the scaling group to manage the
lifecycle of the ECS instances, Auto Scaling only removes the ECS instances from the
scaling group during scale-in activities and the ECS instances that are removed can
still run.
|
Notification Method |
When the lifecycle hook is triggered, Auto Scaling sends a notification or performs
actions based on the notification method that you specify. Valid values:
- No Notification: This is the default value.
- MNS Topic: If you select this option, select an MNS topic. If you specify a notification ID,
the notification ID is sent together with notifications to the MNS topic. This way,
you can manage the notifications by ID.
- MNS Queue: If you select this option, select an MNS queue. If you specify a notification ID,
the notification ID is sent together with notifications to the MNS queue. This way,
you can manage the notifications by ID.
- OOS Template: If you select this option, specify the template type and configure the template
parameters.
- Template types include Public Templates and My Templates. Auto Scaling uses the template that you select to perform actions on ECS instances.
Note
- A template must be created before you select My Templates. For information about how to create a template, see Create a template.
- For information about public templates, see Public Templates.
- Configure the template parameters based on your business requirements. If you want
to configure a RAM role for OOS, take note of the following points:
- A RAM role is created for OOS. The trusted entity type of the RAM role is Alibaba Cloud Service. The trusted service is Operation Orchestration Service. For more information, see "Create a RAM role for OOS" in Grant RAM permissions to OOS.
- The RAM role must be granted the required permissions to use resources such as ECS
and Auto Scaling. Click the name of the RAM role that you created. On the page that
appears, you can view the policy that is attached to the role. For information about
how to attach an authorization policy to a RAM role, see "Attach the required policy
to the OOS-trusted role" in Grant RAM permissions to OOS.
|