Deletes a lifecycle hook.
Description
If you delete a lifecycle hook that is in effect in a scaling group, instances are removed from the pending state in advance. You can use one of the following methods to specify the lifecycle hooks that you want to delete:
- Specify the lifecycle hook ID by using the LifecycleHookId parameter. In this case, the ScalingGroupId parameter and the LifecycleHookName parameter are ignored.
- Specify the scaling group ID by using the ScalingGroupId parameter and specify the lifecycle hook name by using the LifecycleHookName parameter.
Debugging
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-bp14g3ee6bt3sc98**** |
The ID of the lifecycle hook. |
ScalingGroupId | String | No | asg-bp18p2yfxow2dloq**** |
The ID of the scaling group. |
LifecycleHookName | String | No | lifecyclehook**** |
The name of the lifecycle hook. |
RegionId | String | No | cn-hangzhou |
The ID of the region where the scaling group resides. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
Examples
Sample requests
http(s)://ess.aliyuncs.com/?Action=DeleteLifecycleHook
&LifecycleHookId=ash-bp14g3ee6bt3sc98****
&ScalingGroupId=asg-bp18p2yfxow2dloq****
&LifecycleHookName=lifecyclehook****
&RegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeleteLifecycleHookResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</DeleteLifecycleHookResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
For a list of error codes, visit the 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 value that you specified for a 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. |