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 |
Records a heartbeat for the lifecycle action associated with the specified token or instance. This extends the timeout by the length of time defined using the PutLifecycleHook API call.
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 RecordLifecycleActionHeartbeat = RecordLifecycleActionHeartbeat' {}
- newRecordLifecycleActionHeartbeat :: Text -> Text -> RecordLifecycleActionHeartbeat
- recordLifecycleActionHeartbeat_instanceId :: Lens' RecordLifecycleActionHeartbeat (Maybe Text)
- recordLifecycleActionHeartbeat_lifecycleActionToken :: Lens' RecordLifecycleActionHeartbeat (Maybe Text)
- recordLifecycleActionHeartbeat_lifecycleHookName :: Lens' RecordLifecycleActionHeartbeat Text
- recordLifecycleActionHeartbeat_autoScalingGroupName :: Lens' RecordLifecycleActionHeartbeat Text
- data RecordLifecycleActionHeartbeatResponse = RecordLifecycleActionHeartbeatResponse' {
- httpStatus :: Int
- newRecordLifecycleActionHeartbeatResponse :: Int -> RecordLifecycleActionHeartbeatResponse
- recordLifecycleActionHeartbeatResponse_httpStatus :: Lens' RecordLifecycleActionHeartbeatResponse Int
Creating a Request
data RecordLifecycleActionHeartbeat Source #
See: newRecordLifecycleActionHeartbeat
smart constructor.
RecordLifecycleActionHeartbeat' | |
|
Instances
newRecordLifecycleActionHeartbeat Source #
Create a value of RecordLifecycleActionHeartbeat
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:RecordLifecycleActionHeartbeat'
, recordLifecycleActionHeartbeat_instanceId
- The ID of the instance.
$sel:lifecycleActionToken:RecordLifecycleActionHeartbeat'
, recordLifecycleActionHeartbeat_lifecycleActionToken
- A token that uniquely identifies a specific lifecycle action associated
with an instance. Amazon EC2 Auto Scaling sends this token to the
notification target that you specified when you created the lifecycle
hook.
$sel:lifecycleHookName:RecordLifecycleActionHeartbeat'
, recordLifecycleActionHeartbeat_lifecycleHookName
- The name of the lifecycle hook.
$sel:autoScalingGroupName:RecordLifecycleActionHeartbeat'
, recordLifecycleActionHeartbeat_autoScalingGroupName
- The name of the Auto Scaling group.
Request Lenses
recordLifecycleActionHeartbeat_instanceId :: Lens' RecordLifecycleActionHeartbeat (Maybe Text) Source #
The ID of the instance.
recordLifecycleActionHeartbeat_lifecycleActionToken :: Lens' RecordLifecycleActionHeartbeat (Maybe Text) Source #
A token that uniquely identifies a specific lifecycle action associated with an instance. Amazon EC2 Auto Scaling sends this token to the notification target that you specified when you created the lifecycle hook.
recordLifecycleActionHeartbeat_lifecycleHookName :: Lens' RecordLifecycleActionHeartbeat Text Source #
The name of the lifecycle hook.
recordLifecycleActionHeartbeat_autoScalingGroupName :: Lens' RecordLifecycleActionHeartbeat Text Source #
The name of the Auto Scaling group.
Destructuring the Response
data RecordLifecycleActionHeartbeatResponse Source #
See: newRecordLifecycleActionHeartbeatResponse
smart constructor.
RecordLifecycleActionHeartbeatResponse' | |
|
Instances
Eq RecordLifecycleActionHeartbeatResponse Source # | |
Read RecordLifecycleActionHeartbeatResponse Source # | |
Show RecordLifecycleActionHeartbeatResponse Source # | |
Generic RecordLifecycleActionHeartbeatResponse Source # | |
Defined in Amazonka.AutoScaling.RecordLifecycleActionHeartbeat type Rep RecordLifecycleActionHeartbeatResponse :: Type -> Type # | |
NFData RecordLifecycleActionHeartbeatResponse Source # | |
type Rep RecordLifecycleActionHeartbeatResponse Source # | |
Defined in Amazonka.AutoScaling.RecordLifecycleActionHeartbeat type Rep RecordLifecycleActionHeartbeatResponse = D1 ('MetaData "RecordLifecycleActionHeartbeatResponse" "Amazonka.AutoScaling.RecordLifecycleActionHeartbeat" "libZSservicesZSamazonka-autoscalingZSamazonka-autoscaling" 'False) (C1 ('MetaCons "RecordLifecycleActionHeartbeatResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newRecordLifecycleActionHeartbeatResponse Source #
Create a value of RecordLifecycleActionHeartbeatResponse
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:RecordLifecycleActionHeartbeatResponse'
, recordLifecycleActionHeartbeatResponse_httpStatus
- The response's http status code.
Response Lenses
recordLifecycleActionHeartbeatResponse_httpStatus :: Lens' RecordLifecycleActionHeartbeatResponse Int Source #
The response's http status code.