StepScalingActionProps

class aws_cdk.aws_applicationautoscaling.StepScalingActionProps(*, scaling_target, adjustment_type=None, cooldown=None, metric_aggregation_type=None, min_adjustment_magnitude=None, policy_name=None)

Bases: object

Properties for a scaling policy.

Parameters:
  • scaling_target (IScalableTarget) – The scalable target.

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

  • cooldown (Optional[Duration]) – Grace period after scaling activity. For scale out policies, multiple scale outs during the cooldown period are squashed so that only the biggest scale out happens. For scale in policies, subsequent scale ins during the cooldown period are ignored. Default: No cooldown period

  • 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

  • policy_name (Optional[str]) – A name for the scaling policy. Default: Automatically generated name

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_applicationautoscaling as appscaling

# scalable_target: appscaling.ScalableTarget

step_scaling_action_props = appscaling.StepScalingActionProps(
    scaling_target=scalable_target,

    # the properties below are optional
    adjustment_type=appscaling.AdjustmentType.CHANGE_IN_CAPACITY,
    cooldown=cdk.Duration.minutes(30),
    metric_aggregation_type=appscaling.MetricAggregationType.AVERAGE,
    min_adjustment_magnitude=123,
    policy_name="policyName"
)

Attributes

adjustment_type

How the adjustment numbers are interpreted.

Default:

ChangeInCapacity

cooldown

Grace period after scaling activity.

For scale out policies, multiple scale outs during the cooldown period are squashed so that only the biggest scale out happens.

For scale in policies, subsequent scale ins during the cooldown period are ignored.

Default:

No cooldown period

See:

https://docs.aws.amazon.com/autoscaling/application/APIReference/API_StepScalingPolicyConfiguration.html

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

policy_name

A name for the scaling policy.

Default:

Automatically generated name

scaling_target

The scalable target.