Ends the timeout period of a lifecycle hook ahead of schedule.
Usage notes
If you set the LifecycleActionResult parameter for a lifecycle hook of a scaling group to CONTINUE in the operation, Auto Scaling continues to complete the scaling activity in the scaling group after the lifecycle hook times out. If you set the LifecycleActionResult parameter to ABANDON, Auto Scaling stops the scaling activity in the scaling group after the lifecycle hook times out.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CompleteLifecycleAction | The operation that you want to perform. Set the value to CompleteLifecycleAction. |
LifecycleHookId | String | Yes | ash-bp14g3ee6bt3sc98**** | The ID of the lifecycle hook. |
LifecycleActionToken | String | Yes | aaaa-bbbbb-cccc-ddddd | The token of the lifecycle hook. You can obtain the token by using a Message Service (MNS) queue or an MNS topic that is specified for the lifecycle hook. |
LifecycleActionResult | String | No | CONTINUE | The action that you want Auto Scaling to perform after the lifecycle hook times out. Valid values:
If you do not specify this parameter, Auto Scaling performs the action that is specified by the If multiple lifecycle hooks exist in a scaling group and the lifecycle hooks are triggered at the same time, the following rules apply:
|
ClientToken | String | No | 123e4567-e89b-12d3-a456-42665544**** | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
RegionId | String | No | cn-qingdao | The region ID of the scaling group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** | The ID of the request. |
Examples
Sample requests
http(s)://ess.aliyuncs.com/?Action=CompleteLifecycleAction
&LifecycleHookId=ash-bp14g3ee6bt3sc98****
&LifecycleActionToken=aaaa-bbbbb-cccc-ddddd
&LifecycleActionResult=CONTINUE
&ClientToken=123e4567-e89b-12d3-a456-42665544****
&RegionId=cn-qingdao
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CompleteLifecycleActionResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</CompleteLifecycleActionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
For a list of error codes, see Service error codes.
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParamter | The specified value of parameter is invalid. | The error message returned because the specified value of a parameter is invalid. |
400 | LifecycleHookIdAndLifecycleActionToken.Invalid | The specified lifecycleActionToken and lifecycleHookId you provided does not match any in process lifecycle action. | The error message returned because the value that you specified for the LifecycleActionToken parameter does not match the value that you specified for the LifecycleHookId parameter. |