Class CfnLifecycleHookPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.autoscaling.CfnLifecycleHookPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-19T12:55:17.116Z") @Stability(Stable) public class CfnLifecycleHookPropsMixin extends Mixin implements software.constructs.IMixin
The AWS::AutoScaling::LifecycleHook resource specifies lifecycle hooks for an Auto Scaling group.

These hooks let you create solutions that are aware of events in the Auto Scaling instance lifecycle, and then perform a custom action on instances when the corresponding lifecycle event occurs. A lifecycle hook provides a specified amount of time (one hour by default) to wait for the action to complete before the instance transitions to the next state.

Use lifecycle hooks to prepare new instances for use or to delay them from being registered behind a load balancer before their configuration has been applied completely. You can also use lifecycle hooks to prepare running instances to be terminated by, for example, downloading logs or other data.

For more information, see Amazon EC2 Auto Scaling lifecycle hooks in the Amazon EC2 Auto Scaling User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.autoscaling.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnLifecycleHookPropsMixin cfnLifecycleHookPropsMixin = CfnLifecycleHookPropsMixin.Builder.create(CfnLifecycleHookMixinProps.builder()
         .autoScalingGroupName("autoScalingGroupName")
         .defaultResult("defaultResult")
         .heartbeatTimeout(123)
         .lifecycleHookName("lifecycleHookName")
         .lifecycleTransition("lifecycleTransition")
         .notificationMetadata("notificationMetadata")
         .notificationTargetArn("notificationTargetArn")
         .roleArn("roleArn")
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnLifecycleHookPropsMixin

      protected CfnLifecycleHookPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnLifecycleHookPropsMixin

      protected CfnLifecycleHookPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnLifecycleHookPropsMixin

      @Stability(Stable) public CfnLifecycleHookPropsMixin(@NotNull CfnLifecycleHookMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::AutoScaling::LifecycleHook.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnLifecycleHookPropsMixin

      @Stability(Stable) public CfnLifecycleHookPropsMixin(@NotNull CfnLifecycleHookMixinProps props)
      Create a mixin to apply properties to AWS::AutoScaling::LifecycleHook.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnLifecycleHookMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()