Class: AWSCDK::ApplicationAutoScaling::AdjustmentTier

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
application_auto_scaling/adjustment_tier.rb

Overview

An adjustment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(adjustment:, lower_bound: nil, upper_bound: nil) ⇒ AdjustmentTier

Returns a new instance of AdjustmentTier.

Parameters:

  • adjustment (Numeric)

    What number to adjust the capacity with.

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

    Lower bound where this scaling tier applies.

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

    Upper bound where this scaling tier applies.



10
11
12
13
14
15
16
17
# File 'application_auto_scaling/adjustment_tier.rb', line 10

def initialize(adjustment:, lower_bound: nil, upper_bound: nil)
  @adjustment = adjustment
  Jsii::Type.check_type(@adjustment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "adjustment")
  @lower_bound = lower_bound
  Jsii::Type.check_type(@lower_bound, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "lowerBound") unless @lower_bound.nil?
  @upper_bound = upper_bound
  Jsii::Type.check_type(@upper_bound, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "upperBound") unless @upper_bound.nil?
end

Instance Attribute Details

#adjustmentNumeric (readonly)

What number to adjust the capacity with.

The number is interpreted as an added capacity, a new fixed capacity or an added percentage depending on the AdjustmentType value of the StepScalingPolicy.

Can be positive or negative.

Returns:

  • (Numeric)


28
29
30
# File 'application_auto_scaling/adjustment_tier.rb', line 28

def adjustment
  @adjustment
end

#lower_boundNumeric? (readonly)

Note:

Default: -Infinity if this is the first tier, otherwise the upperBound of the previous tier

Lower bound where this scaling tier applies.

The scaling tier applies if the difference between the metric value and its alarm threshold is higher than this value.

Returns:

  • (Numeric, nil)


36
37
38
# File 'application_auto_scaling/adjustment_tier.rb', line 36

def lower_bound
  @lower_bound
end

#upper_boundNumeric? (readonly)

Note:

Default: +Infinity

Upper bound where this scaling tier applies.

The scaling tier applies if the difference between the metric value and its alarm threshold is lower than this value.

Returns:

  • (Numeric, nil)


44
45
46
# File 'application_auto_scaling/adjustment_tier.rb', line 44

def upper_bound
  @upper_bound
end

Class Method Details

.jsii_propertiesObject



46
47
48
49
50
51
52
# File 'application_auto_scaling/adjustment_tier.rb', line 46

def self.jsii_properties
  {
    :adjustment => "adjustment",
    :lower_bound => "lowerBound",
    :upper_bound => "upperBound",
  }
end

Instance Method Details

#to_jsiiObject



54
55
56
57
58
59
60
61
62
# File 'application_auto_scaling/adjustment_tier.rb', line 54

def to_jsii
  result = {}
  result.merge!({
    "adjustment" => @adjustment,
    "lowerBound" => @lower_bound,
    "upperBound" => @upper_bound,
  })
  result.compact
end