public static final class LifecycleHookProps.Builder
extends java.lang.Object
LifecycleHookProps
Constructor and Description |
---|
Builder() |
public LifecycleHookProps.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup)
LifecycleHookProps.getAutoScalingGroup()
autoScalingGroup
- The AutoScalingGroup to add the lifecycle hook to. This parameter is required.this
public LifecycleHookProps.Builder lifecycleTransition(LifecycleTransition lifecycleTransition)
BasicLifecycleHookProps.getLifecycleTransition()
lifecycleTransition
- The state of the Amazon EC2 instance to which you want to attach the lifecycle hook. This parameter is required.this
public LifecycleHookProps.Builder defaultResult(DefaultResult defaultResult)
BasicLifecycleHookProps.getDefaultResult()
defaultResult
- The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs.this
public LifecycleHookProps.Builder heartbeatTimeout(Duration heartbeatTimeout)
BasicLifecycleHookProps.getHeartbeatTimeout()
heartbeatTimeout
- Maximum time between calls to RecordLifecycleActionHeartbeat for the hook.
If the lifecycle hook times out, perform the action in DefaultResult.this
public LifecycleHookProps.Builder lifecycleHookName(java.lang.String lifecycleHookName)
BasicLifecycleHookProps.getLifecycleHookName()
lifecycleHookName
- Name of the lifecycle hook.this
public LifecycleHookProps.Builder notificationMetadata(java.lang.String notificationMetadata)
BasicLifecycleHookProps.getNotificationMetadata()
notificationMetadata
- Additional data to pass to the lifecycle hook target.this
public LifecycleHookProps.Builder notificationTarget(ILifecycleHookTarget notificationTarget)
BasicLifecycleHookProps.getNotificationTarget()
notificationTarget
- The target of the lifecycle hook.this
public LifecycleHookProps.Builder role(IRole role)
BasicLifecycleHookProps.getRole()
role
- The role that allows publishing to the notification target.this
public LifecycleHookProps build()
LifecycleHookProps
java.lang.NullPointerException
- if any required attribute was not provided