Class CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.autoscaling.CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty>
- Enclosing interface:
CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty
@Stability(Stable)
public static final class CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.defaultResult(String defaultResult) heartbeatTimeout(Number heartbeatTimeout) lifecycleHookName(String lifecycleHookName) lifecycleTransition(String lifecycleTransition) notificationMetadata(String notificationMetadata) notificationTargetArn(String notificationTargetArn) notificationTargetArn(ITopicRef notificationTargetArn) notificationTargetArn(IQueueRef notificationTargetArn)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
defaultResult
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder defaultResult(String defaultResult) Sets the value ofCfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.getDefaultResult()- Parameters:
defaultResult- The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs. The default value isABANDON.Valid values:
CONTINUE|ABANDON- Returns:
this
-
heartbeatTimeout
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder heartbeatTimeout(Number heartbeatTimeout) Sets the value ofCfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.getHeartbeatTimeout()- Parameters:
heartbeatTimeout- The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is from30to7200seconds. The default value is3600seconds (1 hour).- Returns:
this
-
lifecycleHookName
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder lifecycleHookName(String lifecycleHookName) Sets the value ofCfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.getLifecycleHookName()- Parameters:
lifecycleHookName- The name of the lifecycle hook.- Returns:
this
-
lifecycleTransition
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder lifecycleTransition(String lifecycleTransition) Sets the value ofCfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.getLifecycleTransition()- Parameters:
lifecycleTransition- The lifecycle transition. For Auto Scaling groups, there are two major lifecycle transitions.- To create a lifecycle hook for scale-out events, specify
autoscaling:EC2_INSTANCE_LAUNCHING. - To create a lifecycle hook for scale-in events, specify
autoscaling:EC2_INSTANCE_TERMINATING.
- To create a lifecycle hook for scale-out events, specify
- Returns:
this
-
notificationMetadata
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder notificationMetadata(String notificationMetadata) Sets the value ofCfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.getNotificationMetadata()- Parameters:
notificationMetadata- Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message to the notification target.- Returns:
this
-
notificationTargetArn
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder notificationTargetArn(String notificationTargetArn) Sets the value ofCfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.getNotificationTargetArn()- Parameters:
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. You can specify an Amazon SNS topic or an Amazon SQS queue.- Returns:
this
-
notificationTargetArn
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder notificationTargetArn(ITopicRef notificationTargetArn) Sets the value ofCfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.getNotificationTargetArn()- Parameters:
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. You can specify an Amazon SNS topic or an Amazon SQS queue.- Returns:
this
-
notificationTargetArn
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder notificationTargetArn(IQueueRef notificationTargetArn) Sets the value ofCfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.getNotificationTargetArn()- Parameters:
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. You can specify an Amazon SNS topic or an Amazon SQS queue.- Returns:
this
-
roleArn
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder roleArn(String roleArn) - Parameters:
roleArn- The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target. For information about creating this role, see Prepare to add a lifecycle hook to your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue.
- Returns:
this
-
roleArn
@Stability(Stable) public CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty.Builder roleArn(IRoleRef roleArn) - Parameters:
roleArn- The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification target. For information about creating this role, see Prepare to add a lifecycle hook to your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide .Valid only if the notification target is an Amazon SNS topic or an Amazon SQS queue.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty>- Returns:
- a new instance of
CfnAutoScalingGroupPropsMixin.LifecycleHookSpecificationProperty - Throws:
NullPointerException- if any required attribute was not provided
-