Class: AWSCDK::Autoscaling::ScalingInterval
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::ScalingInterval
- Defined in:
- autoscaling/scaling_interval.rb
Overview
A range of metric values in which to apply a certain scaling operation.
Instance Attribute Summary collapse
-
#change ⇒ Numeric
readonly
The capacity adjustment to apply in this interval.
-
#lower ⇒ Numeric?
readonly
The lower bound of the interval.
-
#upper ⇒ Numeric?
readonly
The upper bound of the interval.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(change:, lower: nil, upper: nil) ⇒ ScalingInterval
constructor
A new instance of ScalingInterval.
- #to_jsii ⇒ Object
Constructor Details
#initialize(change:, lower: nil, upper: nil) ⇒ ScalingInterval
Returns a new instance of ScalingInterval.
10 11 12 13 14 15 16 17 |
# File 'autoscaling/scaling_interval.rb', line 10 def initialize(change:, lower: nil, upper: nil) @change = change Jsii::Type.check_type(@change, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "change") @lower = lower Jsii::Type.check_type(@lower, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "lower") unless @lower.nil? @upper = upper Jsii::Type.check_type(@upper, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "upper") unless @upper.nil? end |
Instance Attribute Details
#change ⇒ Numeric (readonly)
The capacity adjustment to apply in this interval.
The number is interpreted differently based on AdjustmentType:
- ChangeInCapacity: add the adjustment to the current capacity. The number can be positive or negative.
- PercentChangeInCapacity: add or remove the given percentage of the current capacity to itself. The number can be in the range [-100..100].
- ExactCapacity: set the capacity to this number. The number must be positive.
31 32 33 |
# File 'autoscaling/scaling_interval.rb', line 31 def change @change end |
#lower ⇒ Numeric? (readonly)
Note:
Default: Threshold automatically derived from neighbouring intervals
The lower bound of the interval.
The scaling adjustment will be applied if the metric is higher than this value.
38 39 40 |
# File 'autoscaling/scaling_interval.rb', line 38 def lower @lower end |
#upper ⇒ Numeric? (readonly)
Note:
Default: Threshold automatically derived from neighbouring intervals
The upper bound of the interval.
The scaling adjustment will be applied if the metric is lower than this value.
45 46 47 |
# File 'autoscaling/scaling_interval.rb', line 45 def upper @upper end |
Class Method Details
.jsii_properties ⇒ Object
47 48 49 50 51 52 53 |
# File 'autoscaling/scaling_interval.rb', line 47 def self.jsii_properties { :change => "change", :lower => "lower", :upper => "upper", } end |
Instance Method Details
#to_jsii ⇒ Object
55 56 57 58 59 60 61 62 63 |
# File 'autoscaling/scaling_interval.rb', line 55 def to_jsii result = {} result.merge!({ "change" => @change, "lower" => @lower, "upper" => @upper, }) result.compact end |