Class: AWSCDK::Autoscaling::SignalsOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
autoscaling/signals_options.rb

Overview

Customization options for Signal handling.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(min_success_percentage: nil, timeout: nil) ⇒ SignalsOptions

Returns a new instance of SignalsOptions.

Parameters:

  • min_success_percentage (Numeric, nil) (defaults to: nil)

    The percentage of signals that need to be successful.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    How long to wait for the signals to be sent.



9
10
11
12
13
14
# File 'autoscaling/signals_options.rb', line 9

def initialize(min_success_percentage: nil, timeout: nil)
  @min_success_percentage = min_success_percentage
  Jsii::Type.check_type(@min_success_percentage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minSuccessPercentage") unless @min_success_percentage.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
end

Instance Attribute Details

#min_success_percentageNumeric? (readonly)

Note:

Default: 100

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.

Returns:

  • (Numeric, nil)


23
24
25
# File 'autoscaling/signals_options.rb', line 23

def min_success_percentage
  @min_success_percentage
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: Duration.minutes(5)

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).

Returns:



31
32
33
# File 'autoscaling/signals_options.rb', line 31

def timeout
  @timeout
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
# File 'autoscaling/signals_options.rb', line 33

def self.jsii_properties
  {
    :min_success_percentage => "minSuccessPercentage",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



40
41
42
43
44
45
46
47
# File 'autoscaling/signals_options.rb', line 40

def to_jsii
  result = {}
  result.merge!({
    "minSuccessPercentage" => @min_success_percentage,
    "timeout" => @timeout,
  })
  result.compact
end