Class: AWSCDK::Autoscaling::StepScalingActionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::StepScalingActionProps
- Defined in:
- autoscaling/step_scaling_action_props.rb
Overview
Properties for a scaling policy.
Instance Attribute Summary collapse
-
#adjustment_type ⇒ AWSCDK::Autoscaling::AdjustmentType?
readonly
How the adjustment numbers are interpreted.
-
#auto_scaling_group ⇒ AWSCDK::Interfaces::AWSAutoscaling::IAutoScalingGroupRef
readonly
The auto scaling group.
-
#cooldown ⇒ AWSCDK::Duration?
readonly
deprecated
Deprecated.
cooldown is not valid with step scaling action
-
#estimated_instance_warmup ⇒ AWSCDK::Duration?
readonly
Estimated time until a newly launched instance can send metrics to CloudWatch.
-
#metric_aggregation_type ⇒ AWSCDK::Autoscaling::MetricAggregationType?
readonly
The aggregation type for the CloudWatch metrics.
-
#min_adjustment_magnitude ⇒ Numeric?
readonly
Minimum absolute number to adjust capacity with as result of percentage scaling.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_scaling_group:, adjustment_type: nil, cooldown: nil, estimated_instance_warmup: nil, metric_aggregation_type: nil, min_adjustment_magnitude: nil) ⇒ StepScalingActionProps
constructor
A new instance of StepScalingActionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_scaling_group:, adjustment_type: nil, cooldown: nil, estimated_instance_warmup: nil, metric_aggregation_type: nil, min_adjustment_magnitude: nil) ⇒ StepScalingActionProps
Returns a new instance of StepScalingActionProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'autoscaling/step_scaling_action_props.rb', line 13 def initialize(auto_scaling_group:, adjustment_type: nil, cooldown: nil, estimated_instance_warmup: nil, metric_aggregation_type: nil, min_adjustment_magnitude: nil) @auto_scaling_group = auto_scaling_group Jsii::Type.check_type(@auto_scaling_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hdXRvc2NhbGluZy5JQXV0b1NjYWxpbmdHcm91cFJlZiJ9")), "autoScalingGroup") @adjustment_type = adjustment_type Jsii::Type.check_type(@adjustment_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQWRqdXN0bWVudFR5cGUifQ==")), "adjustmentType") unless @adjustment_type.nil? @cooldown = cooldown Jsii::Type.check_type(@cooldown, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "cooldown") unless @cooldown.nil? @estimated_instance_warmup = estimated_instance_warmup Jsii::Type.check_type(@estimated_instance_warmup, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "estimatedInstanceWarmup") unless @estimated_instance_warmup.nil? @metric_aggregation_type = metric_aggregation_type Jsii::Type.check_type(@metric_aggregation_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuTWV0cmljQWdncmVnYXRpb25UeXBlIn0=")), "metricAggregationType") unless @metric_aggregation_type.nil? @min_adjustment_magnitude = min_adjustment_magnitude Jsii::Type.check_type(@min_adjustment_magnitude, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minAdjustmentMagnitude") unless @min_adjustment_magnitude.nil? end |
Instance Attribute Details
#adjustment_type ⇒ AWSCDK::Autoscaling::AdjustmentType? (readonly)
Default: ChangeInCapacity
How the adjustment numbers are interpreted.
36 37 38 |
# File 'autoscaling/step_scaling_action_props.rb', line 36 def adjustment_type @adjustment_type end |
#auto_scaling_group ⇒ AWSCDK::Interfaces::AWSAutoscaling::IAutoScalingGroupRef (readonly)
The auto scaling group.
31 32 33 |
# File 'autoscaling/step_scaling_action_props.rb', line 31 def auto_scaling_group @auto_scaling_group end |
#cooldown ⇒ AWSCDK::Duration? (readonly)
cooldown is not valid with step scaling action
Default: The default cooldown configured on the AutoScalingGroup
Period after a scaling completes before another scaling activity can start.
42 43 44 |
# File 'autoscaling/step_scaling_action_props.rb', line 42 def cooldown @cooldown end |
#estimated_instance_warmup ⇒ AWSCDK::Duration? (readonly)
Default: Same as the cooldown
Estimated time until a newly launched instance can send metrics to CloudWatch.
47 48 49 |
# File 'autoscaling/step_scaling_action_props.rb', line 47 def estimated_instance_warmup @estimated_instance_warmup end |
#metric_aggregation_type ⇒ AWSCDK::Autoscaling::MetricAggregationType? (readonly)
Default: Average
The aggregation type for the CloudWatch metrics.
52 53 54 |
# File 'autoscaling/step_scaling_action_props.rb', line 52 def metric_aggregation_type @metric_aggregation_type end |
#min_adjustment_magnitude ⇒ Numeric? (readonly)
Default: No minimum scaling effect
Minimum absolute number to adjust capacity with as result of percentage scaling.
Only when using AdjustmentType = PercentChangeInCapacity, this number controls the minimum absolute effect size.
60 61 62 |
# File 'autoscaling/step_scaling_action_props.rb', line 60 def min_adjustment_magnitude @min_adjustment_magnitude end |
Class Method Details
.jsii_properties ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'autoscaling/step_scaling_action_props.rb', line 62 def self.jsii_properties { :auto_scaling_group => "autoScalingGroup", :adjustment_type => "adjustmentType", :cooldown => "cooldown", :estimated_instance_warmup => "estimatedInstanceWarmup", :metric_aggregation_type => "metricAggregationType", :min_adjustment_magnitude => "minAdjustmentMagnitude", } end |
Instance Method Details
#to_jsii ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'autoscaling/step_scaling_action_props.rb', line 73 def to_jsii result = {} result.merge!({ "autoScalingGroup" => @auto_scaling_group, "adjustmentType" => @adjustment_type, "cooldown" => @cooldown, "estimatedInstanceWarmup" => @estimated_instance_warmup, "metricAggregationType" => @metric_aggregation_type, "minAdjustmentMagnitude" => @min_adjustment_magnitude, }) result.compact end |