@Generated(value="software.amazon.awssdk:codegen") public final class PutLifecycleHookRequest extends AutoScalingRequest implements ToCopyableBuilder<PutLifecycleHookRequest.Builder,PutLifecycleHookRequest>
Modifier and Type | Class and Description |
---|---|
static interface |
PutLifecycleHookRequest.Builder |
Modifier and Type | Method and Description |
---|---|
String |
autoScalingGroupName()
The name of the Auto Scaling group.
|
static PutLifecycleHookRequest.Builder |
builder() |
String |
defaultResult()
Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected
failure occurs.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
int |
hashCode() |
Integer |
heartbeatTimeout()
The maximum time, in seconds, that can elapse before the lifecycle hook times out.
|
String |
lifecycleHookName()
The name of the lifecycle hook.
|
String |
lifecycleTransition()
The instance state to which you want to attach the lifecycle hook.
|
String |
notificationMetadata()
Contains additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the
notification target.
|
String |
notificationTargetARN()
The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify you when an instance is in the
transition state for the lifecycle hook.
|
String |
roleARN()
The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends PutLifecycleHookRequest.Builder> |
serializableBuilderClass() |
PutLifecycleHookRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
overrideConfiguration
copy
public String lifecycleHookName()
The name of the lifecycle hook.
public String autoScalingGroupName()
The name of the Auto Scaling group.
public String lifecycleTransition()
The instance state to which you want to attach the lifecycle hook. The possible values are:
autoscaling:EC2_INSTANCE_LAUNCHING
autoscaling:EC2_INSTANCE_TERMINATING
This parameter is required for new lifecycle hooks, but optional when updating existing hooks.
autoscaling:EC2_INSTANCE_LAUNCHING
autoscaling:EC2_INSTANCE_TERMINATING
This parameter is required for new lifecycle hooks, but optional when updating existing hooks.
public String roleARN()
The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.
This parameter is required for new lifecycle hooks, but optional when updating existing hooks.
This parameter is required for new lifecycle hooks, but optional when updating existing hooks.
public String notificationTargetARN()
The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify you when an instance is in the transition state for the lifecycle hook. This target can be either an SQS queue or an SNS topic. If you specify an empty string, this overrides the current ARN.
This operation uses the JSON format when sending notifications to an Amazon SQS queue, and an email key-value pair format when sending notifications to an Amazon SNS topic.
When you specify a notification target, Amazon EC2 Auto Scaling sends it a test message. Test messages contain
the following additional key-value pair: "Event": "autoscaling:TEST_NOTIFICATION"
.
This operation uses the JSON format when sending notifications to an Amazon SQS queue, and an email key-value pair format when sending notifications to an Amazon SNS topic.
When you specify a notification target, Amazon EC2 Auto Scaling sends it a test message. Test messages
contain the following additional key-value pair: "Event": "autoscaling:TEST_NOTIFICATION"
.
public String notificationMetadata()
Contains additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.
public Integer heartbeatTimeout()
The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from 30 to 7200 seconds. The default is 3600 seconds (1 hour).
If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the default action. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat.
If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the default action. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat.
public String defaultResult()
Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if an unexpected
failure occurs. This parameter can be either CONTINUE
or ABANDON
. The default value is
ABANDON
.
CONTINUE
or ABANDON
.
The default value is ABANDON
.public PutLifecycleHookRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<PutLifecycleHookRequest.Builder,PutLifecycleHookRequest>
toBuilder
in class AutoScalingRequest
public static PutLifecycleHookRequest.Builder builder()
public static Class<? extends PutLifecycleHookRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.