You can call this operation to terminate the wait state of a specified scaling activity before the corresponding lifecycle hook times out.

Description

You can set the action following the wait state to CONTINUE to complete this scaling activity or to ABANDON to terminate this scaling activity.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
LifecycleActionToken String Yes aaaa-bbbbb-cccc-ddddd

The token that indicates a specific lifecycle action associated with an instance. You can obtain this token using an MNS queue or MNS topic specified for the lifecycle hook.

LifecycleHookId String Yes ash-****

The ID of the lifecycle hook.

Action String No CompleteLifecycleAction

The operation that you want to perform. Set the value to CompleteLifecycleAction.

LifecycleActionResult String No CONTINUE

The action that the scaling group takes when the wait state is terminated. Valid values:

  • CONTINUE: The scaling group continues to respond to a scale-out or scale-in event.
  • ABANDON: The scaling group releases the created ECS instances if the scaling activity type is scale-out or removes the ECS instances to be scaled-in if the scaling activity type is scale-in.

Default value: CONTINUE.

If the scaling group has multiple lifecycle hooks and one of them is terminated by the DefaultResult=ABANDON parameter during a scale-in event (SCALE_IN), the remaining lifecycle hooks for the same scaling group will also be terminated. Otherwise, the action following the wait state is the next action, as specified in the DefaultResult parameter, after the last lifecycle event under the same scaling group.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Examples

Sample requests


http://ess.aliyuncs.com/?Action=CompleteLifecycleAction
&LifecycleHookId=ash-****
&LifecycleActionToken=aaaa-bbbbb-cccc-ddddd
&LifecycleActionResult=CONTINUE
&<Common request parameters>

Sample success responses

XML format

<CompleteLifecycleActionResponse>
      <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</CompleteLifecycleActionResponse>

JSON format

{
	"RequestId":"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

For more information about error codes, visit API Error Center.

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 the 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 specified lifecycle action token does not match the lifecycle hook ID.