Class: AWSCDK::ApplicationAutoScaling::CfnScalingPolicy::StepScalingPolicyConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ApplicationAutoScaling::CfnScalingPolicy::StepScalingPolicyConfigurationProperty
- Defined in:
- application_auto_scaling/cfn_scaling_policy.rb
Overview
StepScalingPolicyConfiguration is a property of the AWS::ApplicationAutoScaling::ScalingPolicy resource that specifies a step scaling policy configuration for Application Auto Scaling.
For more information, see Step scaling policies in the Application Auto Scaling User Guide .
Instance Attribute Summary collapse
-
#adjustment_type ⇒ String?
readonly
Specifies whether the
ScalingAdjustmentvalue in theStepAdjustmentproperty is an absolute number or a percentage of the current capacity. -
#cooldown ⇒ Numeric?
readonly
The amount of time, in seconds, to wait for a previous scaling activity to take effect.
-
#metric_aggregation_type ⇒ String?
readonly
The aggregation type for the CloudWatch metrics.
-
#min_adjustment_magnitude ⇒ Numeric?
readonly
The minimum value to scale by when the adjustment type is
PercentChangeInCapacity. -
#step_adjustments ⇒ AWSCDK::IResolvable, ...
readonly
A set of adjustments that enable you to scale based on the size of the alarm breach.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(adjustment_type: nil, cooldown: nil, metric_aggregation_type: nil, min_adjustment_magnitude: nil, step_adjustments: nil) ⇒ StepScalingPolicyConfigurationProperty
constructor
A new instance of StepScalingPolicyConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(adjustment_type: nil, cooldown: nil, metric_aggregation_type: nil, min_adjustment_magnitude: nil, step_adjustments: nil) ⇒ StepScalingPolicyConfigurationProperty
Returns a new instance of StepScalingPolicyConfigurationProperty.
1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1599 def initialize(adjustment_type: nil, cooldown: nil, metric_aggregation_type: nil, min_adjustment_magnitude: nil, step_adjustments: nil) @adjustment_type = adjustment_type Jsii::Type.check_type(@adjustment_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "adjustmentType") unless @adjustment_type.nil? @cooldown = cooldown Jsii::Type.check_type(@cooldown, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cooldown") unless @cooldown.nil? @metric_aggregation_type = metric_aggregation_type Jsii::Type.check_type(@metric_aggregation_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "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? @step_adjustments = step_adjustments Jsii::Type.check_type(@step_adjustments, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbGljYXRpb25hdXRvc2NhbGluZy5DZm5TY2FsaW5nUG9saWN5LlN0ZXBBZGp1c3RtZW50UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "stepAdjustments") unless @step_adjustments.nil? end |
Instance Attribute Details
#adjustment_type ⇒ String? (readonly)
Specifies whether the ScalingAdjustment value in the StepAdjustment property is an absolute number or a percentage of the current capacity.
1616 1617 1618 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1616 def adjustment_type @adjustment_type end |
#cooldown ⇒ Numeric? (readonly)
The amount of time, in seconds, to wait for a previous scaling activity to take effect.
If not specified, the default value is 300. For more information, see Cooldown period in the Application Auto Scaling User Guide .
1623 1624 1625 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1623 def cooldown @cooldown end |
#metric_aggregation_type ⇒ String? (readonly)
The aggregation type for the CloudWatch metrics.
Valid values are Minimum , Maximum , and Average . If the aggregation type is null, the value is treated as Average .
1630 1631 1632 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1630 def metric_aggregation_type @metric_aggregation_type end |
#min_adjustment_magnitude ⇒ Numeric? (readonly)
The minimum value to scale by when the adjustment type is PercentChangeInCapacity .
For example, suppose that you create a step scaling policy to scale out an Amazon ECS service by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the service has 4 tasks and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Application Auto Scaling scales out the service by 2 tasks.
1637 1638 1639 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1637 def min_adjustment_magnitude @min_adjustment_magnitude end |
#step_adjustments ⇒ AWSCDK::IResolvable, ... (readonly)
A set of adjustments that enable you to scale based on the size of the alarm breach.
At least one step adjustment is required if you are adding a new step scaling policy configuration.
1644 1645 1646 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1644 def step_adjustments @step_adjustments end |
Class Method Details
.jsii_properties ⇒ Object
1646 1647 1648 1649 1650 1651 1652 1653 1654 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1646 def self.jsii_properties { :adjustment_type => "adjustmentType", :cooldown => "cooldown", :metric_aggregation_type => "metricAggregationType", :min_adjustment_magnitude => "minAdjustmentMagnitude", :step_adjustments => "stepAdjustments", } end |
Instance Method Details
#to_jsii ⇒ Object
1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'application_auto_scaling/cfn_scaling_policy.rb', line 1656 def to_jsii result = {} result.merge!({ "adjustmentType" => @adjustment_type, "cooldown" => @cooldown, "metricAggregationType" => @metric_aggregation_type, "minAdjustmentMagnitude" => @min_adjustment_magnitude, "stepAdjustments" => @step_adjustments, }) result.compact end |