StepScalingPolicy

class aws_cdk.aws_autoscaling.StepScalingPolicy(scope, id, *, auto_scaling_group, metric, scaling_steps, adjustment_type=None, cooldown=None, estimated_instance_warmup=None, min_adjustment_magnitude=None)

Bases: aws_cdk.core.Construct

Define a acaling strategy which scales depending on absolute values of some metric.

You can specify the scaling behavior for various values of the metric.

Implemented using one or more CloudWatch alarms and Step Scaling Policies.

__init__(scope, id, *, auto_scaling_group, metric, scaling_steps, adjustment_type=None, cooldown=None, estimated_instance_warmup=None, min_adjustment_magnitude=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • props

  • auto_scaling_group (IAutoScalingGroup) – The auto scaling group.

  • metric (IMetric) – Metric to scale on.

  • scaling_steps (List[ScalingInterval]) – The intervals for scaling. Maps a range of metric values to a particular scaling behavior.

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

  • cooldown (Optional[Duration]) – Grace period after scaling activity. Default: Default cooldown period on your AutoScalingGroup

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

  • 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

Return type

None

Methods

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

lower_action
Return type

Optional[StepScalingAction]

lower_alarm
Return type

Optional[Alarm]

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

upper_action
Return type

Optional[StepScalingAction]

upper_alarm
Return type

Optional[Alarm]

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool