- class aws_cdk.aws_autoscaling.StepScalingAction(scope, id, *, auto_scaling_group, adjustment_type=None, cooldown=None, estimated_instance_warmup=None, metric_aggregation_type=None, min_adjustment_magnitude=None)
Define a step scaling action.
This kind of scaling policy adjusts the target capacity in configurable steps. The size of the step is configurable based on the metric’s distance to its alarm threshold.
This Action must be used as the target of a CloudWatch alarm to take effect.
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_autoscaling as autoscaling import aws_cdk.core as cdk # auto_scaling_group: autoscaling.AutoScalingGroup step_scaling_action = autoscaling.StepScalingAction(self, "MyStepScalingAction", auto_scaling_group=auto_scaling_group, # the properties below are optional adjustment_type=autoscaling.AdjustmentType.CHANGE_IN_CAPACITY, cooldown=cdk.Duration.minutes(30), estimated_instance_warmup=cdk.Duration.minutes(30), metric_aggregation_type=autoscaling.MetricAggregationType.AVERAGE, min_adjustment_magnitude=123 )
IAutoScalingGroup) – The auto scaling group.
AdjustmentType]) – How the adjustment numbers are interpreted. Default: ChangeInCapacity
Duration]) – Period after a scaling completes before another scaling activity can start. Default: The default cooldown configured on the AutoScalingGroup
Duration]) – Estimated time until a newly launched instance can send metrics to CloudWatch. Default: Same as the cooldown
MetricAggregationType]) – The aggregation type for the CloudWatch metrics. Default: Average
None]) – 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. Default: No minimum scaling effect
- add_adjustment(*, adjustment, lower_bound=None, upper_bound=None)
Add an adjusment interval to the ScalingAction.
float]) – What number to adjust the capacity with. The number is interpeted 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.
None]) – 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. Default: -Infinity if this is the first tier, otherwise the upperBound of the previous tier
None]) – 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. Default: +Infinity
- Return type
Returns a string representation of this construct.
- Return type
The construct tree node associated with this construct.
ARN of the scaling policy.
- classmethod is_construct(x)
Return whether the given object is a Construct.
- Return type