public static final class CfnLifecycleHook.Builder
extends java.lang.Object
CfnLifecycleHook
.Modifier and Type | Method and Description |
---|---|
CfnLifecycleHook.Builder |
autoScalingGroupName(java.lang.String autoScalingGroupName)
The name of the Auto Scaling group.
|
CfnLifecycleHook |
build() |
static CfnLifecycleHook.Builder |
create(Construct scope,
java.lang.String id) |
CfnLifecycleHook.Builder |
defaultResult(java.lang.String defaultResult)
The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs.
|
CfnLifecycleHook.Builder |
heartbeatTimeout(java.lang.Number heartbeatTimeout)
The maximum time, in seconds, that can elapse before the lifecycle hook times out.
|
CfnLifecycleHook.Builder |
lifecycleHookName(java.lang.String lifecycleHookName)
The name of the lifecycle hook.
|
CfnLifecycleHook.Builder |
lifecycleTransition(java.lang.String lifecycleTransition)
The lifecycle transition.
|
CfnLifecycleHook.Builder |
notificationMetadata(java.lang.String notificationMetadata)
Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.
|
CfnLifecycleHook.Builder |
notificationTargetArn(java.lang.String notificationTargetArn)
The Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto Scaling sends notifications to when an instance is in a wait state for the lifecycle hook.
|
CfnLifecycleHook.Builder |
roleArn(java.lang.String roleArn)
The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target.
|
public static CfnLifecycleHook.Builder create(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.CfnLifecycleHook.Builder
.public CfnLifecycleHook.Builder autoScalingGroupName(java.lang.String autoScalingGroupName)
autoScalingGroupName
- The name of the Auto Scaling group. This parameter is required.this
public CfnLifecycleHook.Builder lifecycleTransition(java.lang.String lifecycleTransition)
autoscaling:EC2_INSTANCE_LAUNCHING
.autoscaling:EC2_INSTANCE_TERMINATING
.lifecycleTransition
- The lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions. This parameter is required.this
public CfnLifecycleHook.Builder defaultResult(java.lang.String defaultResult)
The default value is ABANDON
.
Valid values: CONTINUE
| ABANDON
defaultResult
- The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. This parameter is required.this
public CfnLifecycleHook.Builder heartbeatTimeout(java.lang.Number heartbeatTimeout)
The range is from 30
to 7200
seconds. The default value is 3600
seconds (1 hour).
heartbeatTimeout
- The maximum time, in seconds, that can elapse before the lifecycle hook times out. This parameter is required.this
public CfnLifecycleHook.Builder lifecycleHookName(java.lang.String lifecycleHookName)
lifecycleHookName
- The name of the lifecycle hook. This parameter is required.this
public CfnLifecycleHook.Builder notificationMetadata(java.lang.String notificationMetadata)
notificationMetadata
- Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target. This parameter is required.this
public CfnLifecycleHook.Builder notificationTargetArn(java.lang.String notificationTargetArn)
You can specify an Amazon SNS topic or an Amazon SQS queue.
notificationTargetArn
- The Amazon Resource Name (ARN) of the notification target that Amazon EC2 Auto Scaling sends notifications to when an instance is in a wait state for the lifecycle hook. This parameter is required.this
public CfnLifecycleHook.Builder roleArn(java.lang.String roleArn)
For information about creating this role, see Configure a notification target for a lifecycle hook in the Amazon EC2 Auto Scaling User Guide .
Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue.
roleArn
- The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target. This parameter is required.this
public CfnLifecycleHook build()