Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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 Lambda function and a rule that allows CloudWatch Events to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates instances.
- (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 pending state.
- __If you finish before the timeout period ends, complete the lifecycle action.__
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:
$sel:instanceId: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.
$sel:lifecycleHookName:CompleteLifecycleAction'
, completeLifecycleAction_lifecycleHookName
- The name of the lifecycle hook.
$sel:autoScalingGroupName:CompleteLifecycleAction'
, completeLifecycleAction_autoScalingGroupName
- The name of the Auto Scaling group.
$sel:lifecycleActionResult:CompleteLifecycleAction'
, completeLifecycleAction_lifecycleActionResult
- The action for the group to take. This parameter can be 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. This parameter can be either
CONTINUE
or ABANDON
.
Destructuring the Response
data CompleteLifecycleActionResponse Source #
See: newCompleteLifecycleActionResponse
smart constructor.
CompleteLifecycleActionResponse' | |
|
Instances
Eq CompleteLifecycleActionResponse Source # | |
Read CompleteLifecycleActionResponse Source # | |
Show CompleteLifecycleActionResponse Source # | |
Defined in Amazonka.AutoScaling.CompleteLifecycleAction | |
Generic CompleteLifecycleActionResponse Source # | |
NFData CompleteLifecycleActionResponse Source # | |
Defined in Amazonka.AutoScaling.CompleteLifecycleAction rnf :: CompleteLifecycleActionResponse -> () # | |
type Rep CompleteLifecycleActionResponse Source # | |
Defined in Amazonka.AutoScaling.CompleteLifecycleAction type Rep CompleteLifecycleActionResponse = D1 ('MetaData "CompleteLifecycleActionResponse" "Amazonka.AutoScaling.CompleteLifecycleAction" "libZSservicesZSamazonka-autoscalingZSamazonka-autoscaling" '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.