Show / Hide Table of Contents

Class Signals

Configure whether the AutoScalingGroup waits for signals.

Inheritance
System.Object
Signals
Namespace: Amazon.CDK.AWS.AutoScaling
Assembly: Amazon.CDK.AWS.AutoScaling.dll
Syntax (csharp)
public abstract class Signals : DeputyBase
Syntax (vb)
Public MustInherit Class Signals
    Inherits DeputyBase
Remarks

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.

ExampleMetadata: infused

Examples
Vpc vpc;
InstanceType instanceType;
IMachineImage machineImage;


new AutoScalingGroup(this, "ASG", new AutoScalingGroupProps {
    Vpc = vpc,
    InstanceType = instanceType,
    MachineImage = machineImage,

    // ...

    Init = CloudFormationInit.FromElements(InitFile.FromString("/etc/my_instance", "This got written during instance startup")),
    Signals = Signals.WaitForAll(new SignalsOptions {
        Timeout = Duration.Minutes(10)
    })
});

Synopsis

Constructors

Signals()
Signals(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

Signals(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

Methods

DoRender(ISignalsOptions, Nullable<Double>)

Helper to render the actual creation policy, as the logic between them is quite similar.

RenderCreationPolicy(IRenderSignalsOptions)

Render the ASG's CreationPolicy.

WaitForAll(ISignalsOptions)

Wait for the desiredCapacity of the AutoScalingGroup amount of signals to have been received.

WaitForCount(Double, ISignalsOptions)

Wait for a specific amount of signals to have been received.

WaitForMinCapacity(ISignalsOptions)

Wait for the minCapacity of the AutoScalingGroup amount of signals to have been received.

Constructors

Signals()

protected Signals()

Signals(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected Signals(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

Signals(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected Signals(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

Methods

DoRender(ISignalsOptions, Nullable<Double>)

Helper to render the actual creation policy, as the logic between them is quite similar.

protected virtual ICfnCreationPolicy DoRender(ISignalsOptions options, Nullable<double> count = null)
Parameters
options ISignalsOptions
count System.Nullable<System.Double>
Returns

ICfnCreationPolicy

RenderCreationPolicy(IRenderSignalsOptions)

Render the ASG's CreationPolicy.

public abstract ICfnCreationPolicy RenderCreationPolicy(IRenderSignalsOptions renderOptions)
Parameters
renderOptions IRenderSignalsOptions
Returns

ICfnCreationPolicy

WaitForAll(ISignalsOptions)

Wait for the desiredCapacity of the AutoScalingGroup amount of signals to have been received.

public static Signals WaitForAll(ISignalsOptions options = null)
Parameters
options ISignalsOptions
Returns

Signals

Remarks

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(Double, ISignalsOptions)

Wait for a specific amount of signals to have been received.

public static Signals WaitForCount(double count, ISignalsOptions options = null)
Parameters
count System.Double
options ISignalsOptions
Returns

Signals

Remarks

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.

WaitForMinCapacity(ISignalsOptions)

Wait for the minCapacity of the AutoScalingGroup amount of signals to have been received.

public static Signals WaitForMinCapacity(ISignalsOptions options = null)
Parameters
options ISignalsOptions
Returns

Signals

Remarks

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

Back to top Generated by DocFX