Class: AWSCDK::Autoscaling::AdjustmentTier
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::AdjustmentTier
- Defined in:
- autoscaling/adjustment_tier.rb
Overview
An adjustment.
Instance Attribute Summary collapse
-
#adjustment ⇒ Numeric
readonly
What number to adjust the capacity with.
-
#lower_bound ⇒ Numeric?
readonly
Lower bound where this scaling tier applies.
-
#upper_bound ⇒ Numeric?
readonly
Upper bound where this scaling tier applies.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(adjustment:, lower_bound: nil, upper_bound: nil) ⇒ AdjustmentTier
constructor
A new instance of AdjustmentTier.
- #to_jsii ⇒ Object
Constructor Details
#initialize(adjustment:, lower_bound: nil, upper_bound: nil) ⇒ AdjustmentTier
Returns a new instance of AdjustmentTier.
10 11 12 13 14 15 16 17 |
# File 'autoscaling/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
#adjustment ⇒ Numeric (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.
28 29 30 |
# File 'autoscaling/adjustment_tier.rb', line 28 def adjustment @adjustment end |
#lower_bound ⇒ Numeric? (readonly)
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.
36 37 38 |
# File 'autoscaling/adjustment_tier.rb', line 36 def lower_bound @lower_bound end |
#upper_bound ⇒ Numeric? (readonly)
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.
44 45 46 |
# File 'autoscaling/adjustment_tier.rb', line 44 def upper_bound @upper_bound end |
Class Method Details
.jsii_properties ⇒ Object
46 47 48 49 50 51 52 |
# File 'autoscaling/adjustment_tier.rb', line 46 def self.jsii_properties { :adjustment => "adjustment", :lower_bound => "lowerBound", :upper_bound => "upperBound", } end |
Instance Method Details
#to_jsii ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'autoscaling/adjustment_tier.rb', line 54 def to_jsii result = {} result.merge!({ "adjustment" => @adjustment, "lowerBound" => @lower_bound, "upperBound" => @upper_bound, }) result.compact end |