StepScalingActionProps

class aws_cdk.aws_autoscaling.StepScalingActionProps(*, adjustment_type=None, auto_scaling_group, cooldown=None, estimated_instance_warmup=None, metric_aggregation_type=None, min_adjustment_magnitude=None)

Bases: object

Properties for a scaling policy.

Parameters
  • adjustment_type (Optional[AdjustmentType]) – How the adjustment numbers are interpreted. Default: ChangeInCapacity

  • auto_scaling_group (IAutoScalingGroup) – The auto scaling group.

  • cooldown (Optional[Duration]) – Period after a scaling completes before another scaling activity can start. Default: The default cooldown configured on the AutoScalingGroup

  • estimated_instance_warmup (Optional[Duration]) – Estimated time until a newly launched instance can send metrics to CloudWatch. Default: Same as the cooldown

  • metric_aggregation_type (Optional[MetricAggregationType]) – The aggregation type for the CloudWatch metrics. Default: Average

  • min_adjustment_magnitude (Union[int, float, 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

Example:

# 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 is of type AutoScalingGroup

step_scaling_action_props = autoscaling.StepScalingActionProps(
    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
)

Attributes

adjustment_type

How the adjustment numbers are interpreted.

Default

ChangeInCapacity

Return type

Optional[AdjustmentType]

auto_scaling_group

The auto scaling group.

Return type

IAutoScalingGroup

cooldown

Period after a scaling completes before another scaling activity can start.

Default

The default cooldown configured on the AutoScalingGroup

Return type

Optional[Duration]

estimated_instance_warmup

Estimated time until a newly launched instance can send metrics to CloudWatch.

Default

Same as the cooldown

Return type

Optional[Duration]

metric_aggregation_type

The aggregation type for the CloudWatch metrics.

Default

Average

Return type

Optional[MetricAggregationType]

min_adjustment_magnitude

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

Return type

Union[int, float, None]