Interface BasicLifecycleHookProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
LifecycleHookProps
All Known Implementing Classes:
BasicLifecycleHookProps.Jsii$Proxy, LifecycleHookProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:45.189Z") @Stability(Stable) public interface BasicLifecycleHookProps extends software.amazon.jsii.JsiiSerializable
Basic properties for a lifecycle hook.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.autoscaling.*;
 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.core.*;
 ILifecycleHookTarget lifecycleHookTarget;
 Role role;
 BasicLifecycleHookProps basicLifecycleHookProps = BasicLifecycleHookProps.builder()
         .lifecycleTransition(LifecycleTransition.INSTANCE_LAUNCHING)
         // the properties below are optional
         .defaultResult(DefaultResult.CONTINUE)
         .heartbeatTimeout(Duration.minutes(30))
         .lifecycleHookName("lifecycleHookName")
         .notificationMetadata("notificationMetadata")
         .notificationTarget(lifecycleHookTarget)
         .role(role)
         .build();
 
  • Method Details

    • getLifecycleTransition

      @Stability(Stable) @NotNull LifecycleTransition getLifecycleTransition()
      The state of the Amazon EC2 instance to which you want to attach the lifecycle hook.
    • getDefaultResult

      @Stability(Stable) @Nullable default DefaultResult getDefaultResult()
      The action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occurs.

      Default: Continue

    • getHeartbeatTimeout

      @Stability(Stable) @Nullable default Duration getHeartbeatTimeout()
      Maximum time between calls to RecordLifecycleActionHeartbeat for the hook.

      If the lifecycle hook times out, perform the action in DefaultResult.

      Default: - No heartbeat timeout.

    • getLifecycleHookName

      @Stability(Stable) @Nullable default String getLifecycleHookName()
      Name of the lifecycle hook.

      Default: - Automatically generated name.

    • getNotificationMetadata

      @Stability(Stable) @Nullable default String getNotificationMetadata()
      Additional data to pass to the lifecycle hook target.

      Default: - No metadata.

    • getNotificationTarget

      @Stability(Stable) @Nullable default ILifecycleHookTarget getNotificationTarget()
      The target of the lifecycle hook.

      Default: - No target.

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The role that allows publishing to the notification target.

      Default: - A role will be created if a target is provided. Otherwise, no role is created.

    • builder

      @Stability(Stable) static BasicLifecycleHookProps.Builder builder()
      Returns:
      a BasicLifecycleHookProps.Builder of BasicLifecycleHookProps