Class: AWSCDK::Autoscaling::StepScalingPolicy
- Inherits:
-
Constructs::Construct
- Object
- Constructs::Construct
- AWSCDK::Autoscaling::StepScalingPolicy
- Defined in:
- autoscaling/step_scaling_policy.rb
Overview
Define a acaling strategy which scales depending on absolute values of some metric.
You can specify the scaling behavior for various values of the metric.
Implemented using one or more CloudWatch alarms and Step Scaling Policies.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(scope, id, props) ⇒ StepScalingPolicy
constructor
A new instance of StepScalingPolicy.
- #lower_action ⇒ AWSCDK::Autoscaling::StepScalingAction?
- #lower_alarm ⇒ AWSCDK::CloudWatch::Alarm?
-
#node ⇒ Constructs::Node
The tree node.
-
#to_string ⇒ String
Returns a string representation of this construct.
- #upper_action ⇒ AWSCDK::Autoscaling::StepScalingAction?
- #upper_alarm ⇒ AWSCDK::CloudWatch::Alarm?
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ StepScalingPolicy
Returns a new instance of StepScalingPolicy.
15 16 17 18 19 20 21 |
# File 'autoscaling/step_scaling_policy.rb', line 15 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::Autoscaling::StepScalingPolicyProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuU3RlcFNjYWxpbmdQb2xpY3lQcm9wcyJ9")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'autoscaling/step_scaling_policy.rb', line 23 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :lower_action => { kind: :property, name: "lowerAction", is_optional: true }, :lower_alarm => { kind: :property, name: "lowerAlarm", is_optional: true }, :upper_action => { kind: :property, name: "upperAction", is_optional: true }, :upper_alarm => { kind: :property, name: "upperAlarm", is_optional: true }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, } end |
Instance Method Details
#lower_action ⇒ AWSCDK::Autoscaling::StepScalingAction?
43 44 45 |
# File 'autoscaling/step_scaling_policy.rb', line 43 def lower_action() jsii_get_property("lowerAction") end |
#lower_alarm ⇒ AWSCDK::CloudWatch::Alarm?
48 49 50 |
# File 'autoscaling/step_scaling_policy.rb', line 48 def lower_alarm() jsii_get_property("lowerAlarm") end |
#node ⇒ Constructs::Node
The tree node.
38 39 40 |
# File 'autoscaling/step_scaling_policy.rb', line 38 def node() jsii_get_property("node") end |
#to_string ⇒ String
Returns a string representation of this construct.
65 66 67 |
# File 'autoscaling/step_scaling_policy.rb', line 65 def to_string() jsii_call_method("toString", []) end |
#upper_action ⇒ AWSCDK::Autoscaling::StepScalingAction?
53 54 55 |
# File 'autoscaling/step_scaling_policy.rb', line 53 def upper_action() jsii_get_property("upperAction") end |
#upper_alarm ⇒ AWSCDK::CloudWatch::Alarm?
58 59 60 |
# File 'autoscaling/step_scaling_policy.rb', line 58 def upper_alarm() jsii_get_property("upperAlarm") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
78 79 80 81 82 83 |
# File 'autoscaling/step_scaling_policy.rb', line 78 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |