SignalsOptions

class aws_cdk.aws_autoscaling.SignalsOptions(*, min_success_percentage=None, timeout=None)

Bases: object

Customization options for Signal handling.

Parameters
  • min_success_percentage (Union[int, float, None]) – The percentage of signals that need to be successful. If this number is less than 100, a percentage of signals may be failure signals while still succeeding the creation or update in CloudFormation. Default: 100

  • timeout (Optional[Duration]) – How long to wait for the signals to be sent. This should reflect how long it takes your instances to start up (including instance start time and instance initialization time). Default: Duration.minutes(5)

Example:

# vpc is of type Vpc
# instance_type is of type InstanceType
# machine_image is of type IMachineImage


autoscaling.AutoScalingGroup(self, "ASG",
    vpc=vpc,
    instance_type=instance_type,
    machine_image=machine_image,

    # ...

    init=ec2.CloudFormationInit.from_elements(
        ec2.InitFile.from_string("/etc/my_instance", "This got written during instance startup")),
    signals=autoscaling.Signals.wait_for_all(
        timeout=Duration.minutes(10)
    )
)

Attributes

min_success_percentage

The percentage of signals that need to be successful.

If this number is less than 100, a percentage of signals may be failure signals while still succeeding the creation or update in CloudFormation.

Default

100

Return type

Union[int, float, None]

timeout

How long to wait for the signals to be sent.

This should reflect how long it takes your instances to start up (including instance start time and instance initialization time).

Default

Duration.minutes(5)

Return type

Optional[Duration]