Class Signals
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected CfnCreationPolicy
doRender
(SignalsOptions options) Helper to render the actual creation policy, as the logic between them is quite similar.protected CfnCreationPolicy
doRender
(SignalsOptions options, Number count) Helper to render the actual creation policy, as the logic between them is quite similar.abstract CfnCreationPolicy
renderCreationPolicy
(RenderSignalsOptions renderOptions) Render the ASG's CreationPolicy.static Signals
Wait for the desiredCapacity of the AutoScalingGroup amount of signals to have been received.static Signals
waitForAll
(SignalsOptions options) Wait for the desiredCapacity of the AutoScalingGroup amount of signals to have been received.static Signals
waitForCount
(Number count) Wait for a specific amount of signals to have been received.static Signals
waitForCount
(Number count, SignalsOptions options) 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
waitForMinCapacity
(SignalsOptions options) 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
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
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
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
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
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.
-