AutoScaling / Client / delete_lifecycle_hook

delete_lifecycle_hook#

AutoScaling.Client.delete_lifecycle_hook(**kwargs)#

Deletes the specified lifecycle hook.

If there are any outstanding lifecycle actions, they are completed first ( ABANDON for launching instances, CONTINUE for terminating instances).

See also: AWS API Documentation

Request Syntax

response = client.delete_lifecycle_hook(
    LifecycleHookName='string',
    AutoScalingGroupName='string'
)
Parameters:
  • LifecycleHookName (string) –

    [REQUIRED]

    The name of the lifecycle hook.

  • AutoScalingGroupName (string) –

    [REQUIRED]

    The name of the Auto Scaling group.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • AutoScaling.Client.exceptions.ResourceContentionFault

Examples

This example deletes the specified lifecycle hook.

response = client.delete_lifecycle_hook(
    AutoScalingGroupName='my-auto-scaling-group',
    LifecycleHookName='my-lifecycle-hook',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}