Modifies the information of a lifecycle hook.
Operation description
Operation description
You can specify the lifecycle hook to be modified in one of the following ways:
-
Specify only the lifecycle hook ID (
LifecycleHookId). In this case, the scaling group ID (ScalingGroupId) and lifecycle hook name (LifecycleHookName) parameters are ignored. -
Specify both the scaling group ID (
ScalingGroupId) and the lifecycle hook name (LifecycleHookName), because a lifecycle hook name is unique within a 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 to be modified. This parameter is used to specify the lifecycle hook. |
ash-bp1fxuqyi98w0aib**** |
| ScalingGroupId |
string |
No |
The ID of the scaling group. This parameter is used to specify the lifecycle hook. |
asg-bp18p2yfxow2dloq**** |
| LifecycleHookName |
string |
No |
The name of the lifecycle hook to be modified. This parameter is used to specify the lifecycle hook. |
test_SCAL**** |
| DefaultResult |
string |
No |
The action to be performed after the wait state ends. Valid values:
When a scale-in activity (SCALE_IN) occurs in a scaling group and multiple lifecycle hooks are triggered, if the |
CONTINUE |
| HeartbeatTimeout |
integer |
No |
The wait time set by the lifecycle hook for the scaling activity. The next action is performed after the wait state times out. Valid values: 30 to 21600. Unit: seconds. You can call the RecordLifecycleActionHeartbeat operation to extend the wait time of the ECS instance, or call the CompleteLifecycleAction operation to end the wait state of the scaling activity in advance. |
600 |
| LifecycleTransition |
string |
No |
The type of scaling activity to which the lifecycle hook applies. Valid values:
|
SCALE_IN |
| NotificationMetadata |
string |
No |
The fixed string information for the wait state of the scaling activity. The value can be up to 4,096 characters in length. When Auto Scaling pushes a message to the notification recipient, it also sends the predefined |
Test |
| NotificationArn |
string |
No |
The identifier of the notification recipient for the lifecycle hook. The following notification methods are supported when you set this parameter:
Variables in the formats:
|
acs:mns:cn-beijing:161456884340****:queue/modifyLifecycleHo**** |
| RegionId |
string |
No |
The region ID of the scaling group. |
cn-beijing |
| LifecycleHookStatus |
string |
No |
The status of the lifecycle hook. Valid values:
If you do not set this parameter, the status of the lifecycle hook remains unchanged. Note
After a lifecycle hook is created, it is in the Active state by default. |
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.