Modifies a lifecycle hook. You can change the scaling activity type, timeout period, and default action. Specify the target hook by its ID, name, or scaling group.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:ModifyLifecycleHook |
update |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| LifecycleHookId |
string |
No |
The ID of the lifecycle hook that you want to modify. |
ash-bp1fxuqyi98w0aib**** |
| ScalingGroupId |
string |
No |
The ID of the scaling group to which the lifecycle hook belongs. |
asg-bp18p2yfxow2dloq**** |
| LifecycleHookName |
string |
No |
The name of the lifecycle hook that you want to modify. |
test_SCALE_IN |
| DefaultResult |
string |
No |
The action that Auto Scaling performs after the lifecycle hook times out. Valid values:
If multiple lifecycle hooks in a scaling group are triggered during scale-in activities and you set DefaultResult to ABANDON, Auto Scaling immediately performs the action after this hook ends, causing other lifecycle hooks to end ahead of schedule. Otherwise, Auto Scaling performs the action only after all lifecycle hooks end. |
CONTINUE |
| HeartbeatTimeout |
integer |
No |
The timeout period of the lifecycle hook. Auto Scaling performs the default action when this period expires. Valid values: 30 to 21600. Unit: seconds. Call RecordLifecycleActionHeartbeat to extend the timeout, or CompleteLifecycleAction to end a lifecycle hook early. |
600 |
| LifecycleTransition |
string |
No |
The type of scaling activity to which the lifecycle hook applies. Valid values:
|
SCALE_IN |
| NotificationMetadata |
string |
No |
A fixed string included in notifications that Auto Scaling sends when the lifecycle hook takes effect. Maximum length: 4,096 characters. Use this parameter to categorize notifications. Takes effect only when NotificationArn is specified. |
Test |
| NotificationArn |
string |
No |
The Alibaba Cloud Resource Name (ARN) of the notification recipient. Valid formats:
Variables:
|
acs:mns:cn-beijing:161456884340****:queue/modifyLifecycleHo**** |
| RegionId |
string |
No |
The region ID of the scaling group. |
cn-beijing |
| LifecycleHookStatus |
string |
No |
The status to set for the lifecycle hook. Valid values:
If not specified, the status remains unchanged. Note
Lifecycle hooks are Active by default after creation. |
Active |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
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.