Smaws_Client_AutoScaling.PutLifecycleHookCreates or updates a lifecycle hook for the specified Auto Scaling group.
Lifecycle hooks let you create solutions that are aware of events in the Auto Scaling instance lifecycle, and then perform a custom action on instances when the corresponding lifecycle event occurs.
This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
For more information, see Amazon EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide.
If you exceed your maximum limit of lifecycle hooks, which by default is 50 per Auto Scaling group, the call fails.
You can view the lifecycle hooks for an Auto Scaling group using the DescribeLifecycleHooks API call. If you are no longer using a lifecycle hook, you can delete it by calling the DeleteLifecycleHook API.
val error_to_string :
[ Smaws_Lib.Protocols.AwsQuery.error
| `LimitExceededFault of Types.limit_exceeded_fault
| `ResourceContentionFault of Types.resource_contention_fault ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.put_lifecycle_hook_type ->
(Types.put_lifecycle_hook_answer,
[> Smaws_Lib.Protocols.AwsQuery.error
| `LimitExceededFault of Types.limit_exceeded_fault
| `ResourceContentionFault of Types.resource_contention_fault ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.put_lifecycle_hook_type ->
(Types.put_lifecycle_hook_answer Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsQuery.error
| `LimitExceededFault of Types.limit_exceeded_fault
| `ResourceContentionFault of Types.resource_contention_fault ]
* Smaws_Lib.Response.metadata)
Stdlib.result