Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Completes the lifecycle action for the specified token or instance with the specified result.
This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:
- (Optional) Create a launch template or launch configuration with a user data script that runs while an instance is in a wait state due to a lifecycle hook.
- (Optional) Create a Lambda function and a rule that allows Amazon EventBridge to invoke your Lambda function when an instance is put into a wait state due to a lifecycle hook.
- (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to the target.
- Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
- If you need more time, record the lifecycle action heartbeat to keep the instance in a wait state.
- __If you finish before the timeout period ends, send a callback by using the CompleteLifecycleAction API call.__
For more information, see Amazon EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide.
Synopsis
- data CompleteLifecycleAction = CompleteLifecycleAction' {}
- newCompleteLifecycleAction :: Text -> Text -> Text -> CompleteLifecycleAction
- completeLifecycleAction_instanceId :: Lens' CompleteLifecycleAction (Maybe Text)
- completeLifecycleAction_lifecycleActionToken :: Lens' CompleteLifecycleAction (Maybe Text)
- completeLifecycleAction_lifecycleHookName :: Lens' CompleteLifecycleAction Text
- completeLifecycleAction_autoScalingGroupName :: Lens' CompleteLifecycleAction Text
- completeLifecycleAction_lifecycleActionResult :: Lens' CompleteLifecycleAction Text
- data CompleteLifecycleActionResponse = CompleteLifecycleActionResponse' {
- httpStatus :: Int
- newCompleteLifecycleActionResponse :: Int -> CompleteLifecycleActionResponse
- completeLifecycleActionResponse_httpStatus :: Lens' CompleteLifecycleActionResponse Int
Creating a Request
data CompleteLifecycleAction Source #
See: newCompleteLifecycleAction
smart constructor.
CompleteLifecycleAction' | |
|
Instances
newCompleteLifecycleAction Source #
:: Text | |
-> Text | |
-> Text | |
-> CompleteLifecycleAction |
Create a value of CompleteLifecycleAction
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CompleteLifecycleAction
, completeLifecycleAction_instanceId
- The ID of the instance.
$sel:lifecycleActionToken:CompleteLifecycleAction'
, completeLifecycleAction_lifecycleActionToken
- A universally unique identifier (UUID) that identifies a specific
lifecycle action associated with an instance. Amazon EC2 Auto Scaling
sends this token to the notification target you specified when you
created the lifecycle hook.
CompleteLifecycleAction
, completeLifecycleAction_lifecycleHookName
- The name of the lifecycle hook.
CompleteLifecycleAction
, completeLifecycleAction_autoScalingGroupName
- The name of the Auto Scaling group.
$sel:lifecycleActionResult:CompleteLifecycleAction'
, completeLifecycleAction_lifecycleActionResult
- The action for the group to take. You can specify either CONTINUE
or
ABANDON
.
Request Lenses
completeLifecycleAction_instanceId :: Lens' CompleteLifecycleAction (Maybe Text) Source #
The ID of the instance.
completeLifecycleAction_lifecycleActionToken :: Lens' CompleteLifecycleAction (Maybe Text) Source #
A universally unique identifier (UUID) that identifies a specific lifecycle action associated with an instance. Amazon EC2 Auto Scaling sends this token to the notification target you specified when you created the lifecycle hook.
completeLifecycleAction_lifecycleHookName :: Lens' CompleteLifecycleAction Text Source #
The name of the lifecycle hook.
completeLifecycleAction_autoScalingGroupName :: Lens' CompleteLifecycleAction Text Source #
The name of the Auto Scaling group.
completeLifecycleAction_lifecycleActionResult :: Lens' CompleteLifecycleAction Text Source #
The action for the group to take. You can specify either CONTINUE
or
ABANDON
.
Destructuring the Response
data CompleteLifecycleActionResponse Source #
See: newCompleteLifecycleActionResponse
smart constructor.
CompleteLifecycleActionResponse' | |
|
Instances
Generic CompleteLifecycleActionResponse Source # | |
Read CompleteLifecycleActionResponse Source # | |
Show CompleteLifecycleActionResponse Source # | |
Defined in Amazonka.AutoScaling.CompleteLifecycleAction | |
NFData CompleteLifecycleActionResponse Source # | |
Defined in Amazonka.AutoScaling.CompleteLifecycleAction rnf :: CompleteLifecycleActionResponse -> () # | |
Eq CompleteLifecycleActionResponse Source # | |
type Rep CompleteLifecycleActionResponse Source # | |
Defined in Amazonka.AutoScaling.CompleteLifecycleAction type Rep CompleteLifecycleActionResponse = D1 ('MetaData "CompleteLifecycleActionResponse" "Amazonka.AutoScaling.CompleteLifecycleAction" "amazonka-autoscaling-2.0-IerpHfP4BA3Ir4ZL2IR1De" 'False) (C1 ('MetaCons "CompleteLifecycleActionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newCompleteLifecycleActionResponse Source #
Create a value of CompleteLifecycleActionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:CompleteLifecycleActionResponse'
, completeLifecycleActionResponse_httpStatus
- The response's http status code.
Response Lenses
completeLifecycleActionResponse_httpStatus :: Lens' CompleteLifecycleActionResponse Int Source #
The response's http status code.