You can call this operation to delete a lifecycle hook.

Description

The wait state will be terminated after the corresponding lifecycle hook is deleted. You can delete a lifecycle hook using either of the following methods:

  • Specify the LifecycleHookId parameter. In this case, you do not need to specify the ScalingGroupId and LifecycleHookName parameters.
  • Specify both the ScalingGroupId and LifecycleHookName parameters.

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
Action String Yes DeleteLifecycleHook

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

LifecycleHookId String No ash-****

The ID of the lifecycle hook.

LifecycleHookName String No test_SCALE_IN

The name of the lifecycle hook.

ScalingGroupId String No dP8VqSd9ENXPc0ciVmbc****

The ID of the 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 = fig
&LifecycleHookId=ash-****
&<Common request parameters>

Sample success responses

XML format

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

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

InvalidLifecycleHookId.NotExist

The specified lifecycleHookId does not exist.

The error message returned because the specified lifecycle hook ID does not exist.

400

InvalidLifecycleHookName.NotExist

The specified lifecycleHookName you provided does not exist.

The error message returned because the specified lifecycle hook name does not exist.