java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.autoscaling.Signals
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:10.672Z") @Stability(Stable) public abstract class Signals extends software.amazon.jsii.JsiiObject
Configure whether the AutoScalingGroup waits for signals.

If you do configure waiting for signals, you should make sure the instances invoke cfn-signal somewhere in their UserData to signal that they have started up (either successfully or unsuccessfully).

Signals are used both during intial creation and subsequent updates.

Example:

 Vpc vpc;
 InstanceType instanceType;
 IMachineImage machineImage;
 AutoScalingGroup.Builder.create(this, "ASG")
         .vpc(vpc)
         .instanceType(instanceType)
         .machineImage(machineImage)
         // ...
         .init(CloudFormationInit.fromElements(InitFile.fromString("/etc/my_instance", "This got written during instance startup")))
         .signals(Signals.waitForAll(SignalsOptions.builder()
                 .timeout(Duration.minutes(10))
                 .build()))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    Signals(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Signals(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Helper to render the actual creation policy, as the logic between them is quite similar.
    doRender(SignalsOptions options, Number count)
    Helper to render the actual creation policy, as the logic between them is quite similar.
    Render the ASG's CreationPolicy.
    static Signals
    Wait for the desiredCapacity of the AutoScalingGroup amount of signals to have been received.
    static Signals
    Wait for the desiredCapacity of the AutoScalingGroup amount of signals to have been received.
    static Signals
    Wait for a specific amount of signals to have been received.
    static Signals
    Wait for a specific amount of signals to have been received.
    static Signals
    Wait for the minCapacity of the AutoScalingGroup amount of signals to have been received.
    static Signals
    Wait for the minCapacity of the AutoScalingGroup amount of signals to have been received.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Signals

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

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

      @Stability(Stable) protected Signals()
  • Method Details

    • waitForAll

      @Stability(Stable) @NotNull public static Signals waitForAll(@Nullable SignalsOptions options)
      Wait for the desiredCapacity of the AutoScalingGroup amount of signals to have been received.

      If no desiredCapacity has been configured, wait for minCapacity signals intead.

      This number is used during initial creation and during replacing updates. During rolling updates, all updated instances must send a signal.

      Parameters:
      options -
    • waitForAll

      @Stability(Stable) @NotNull public static Signals waitForAll()
      Wait for the desiredCapacity of the AutoScalingGroup amount of signals to have been received.

      If no desiredCapacity has been configured, wait for minCapacity signals intead.

      This number is used during initial creation and during replacing updates. During rolling updates, all updated instances must send a signal.

    • waitForCount

      @Stability(Stable) @NotNull public static Signals waitForCount(@NotNull Number count, @Nullable SignalsOptions options)
      Wait for a specific amount of signals to have been received.

      You should send one signal per instance, so this represents the number of instances to wait for.

      This number is used during initial creation and during replacing updates. During rolling updates, all updated instances must send a signal.

      Parameters:
      count - This parameter is required.
      options -
    • waitForCount

      @Stability(Stable) @NotNull public static Signals waitForCount(@NotNull Number count)
      Wait for a specific amount of signals to have been received.

      You should send one signal per instance, so this represents the number of instances to wait for.

      This number is used during initial creation and during replacing updates. During rolling updates, all updated instances must send a signal.

      Parameters:
      count - This parameter is required.
    • waitForMinCapacity

      @Stability(Stable) @NotNull public static Signals waitForMinCapacity(@Nullable SignalsOptions options)
      Wait for the minCapacity of the AutoScalingGroup amount of signals to have been received.

      This number is used during initial creation and during replacing updates. During rolling updates, all updated instances must send a signal.

      Parameters:
      options -
    • waitForMinCapacity

      @Stability(Stable) @NotNull public static Signals waitForMinCapacity()
      Wait for the minCapacity of the AutoScalingGroup amount of signals to have been received.

      This number is used during initial creation and during replacing updates. During rolling updates, all updated instances must send a signal.

    • doRender

      @Stability(Stable) @NotNull protected CfnCreationPolicy doRender(@NotNull SignalsOptions options, @Nullable Number count)
      Helper to render the actual creation policy, as the logic between them is quite similar.

      Parameters:
      options - This parameter is required.
      count -
    • doRender

      @Stability(Stable) @NotNull protected CfnCreationPolicy doRender(@NotNull SignalsOptions options)
      Helper to render the actual creation policy, as the logic between them is quite similar.

      Parameters:
      options - This parameter is required.
    • renderCreationPolicy

      @Stability(Stable) @NotNull public abstract CfnCreationPolicy renderCreationPolicy(@NotNull RenderSignalsOptions renderOptions)
      Render the ASG's CreationPolicy.

      Parameters:
      renderOptions - This parameter is required.