StepScalingActionProps

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

Bases: object

Properties for a scaling policy.

Parameters:
  • auto_scaling_group (IAutoScalingGroup) – The auto scaling group.

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

  • cooldown (Optional[Duration]) – (deprecated) 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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_autoscaling as autoscaling

# auto_scaling_group: autoscaling.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

auto_scaling_group

The auto scaling group.

cooldown

(deprecated) Period after a scaling completes before another scaling activity can start.

Default:

The default cooldown configured on the AutoScalingGroup

Deprecated:

cooldown is not valid with step scaling action

Stability:

deprecated

estimated_instance_warmup

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

Default:

Same as the cooldown

metric_aggregation_type

The aggregation type for the CloudWatch metrics.

Default:

Average

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