Skip to content

ScalingPolicy

Source code in docs_src/capo_auto_scaling/types/scaling_policy.py
class ScalingPolicy(TypedDict, closed=True):
    auto_scaling_group_name: NotRequired[
        "capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
    ]
    """<p>The name of the Auto Scaling group.</p>"""
    policy_name: NotRequired[
        "capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
    ]
    """<p>The name of the scaling policy.</p>"""
    policy_arn: NotRequired["capo_auto_scaling.types.resource_name.ResourceName"]
    """<p>The Amazon Resource Name (ARN) of the policy.</p>"""
    policy_type: NotRequired[
        "capo_auto_scaling.types.xml_string_max_len64.XmlStringMaxLen64"
    ]
    """<p>One of the following policy types: </p> <ul> <li> <p> <code>TargetTrackingScaling</code> </p> </li> <li> <p> <code>StepScaling</code> </p> </li> <li> <p> <code>SimpleScaling</code> (default)</p> </li> <li> <p> <code>PredictiveScaling</code> </p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html">Target tracking scaling policies</a> and <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html">Step and simple scaling policies</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>"""
    adjustment_type: NotRequired[
        "capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
    ]
    """<p>Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid values are <code>ChangeInCapacity</code>, <code>ExactCapacity</code>, and <code>PercentChangeInCapacity</code>.</p>"""
    min_adjustment_step: NotRequired[
        "capo_auto_scaling.types.min_adjustment_step.MinAdjustmentStep"
    ]
    """<p>Available for backward compatibility. Use <code>MinAdjustmentMagnitude</code> instead.</p>"""
    min_adjustment_magnitude: NotRequired[
        "capo_auto_scaling.types.min_adjustment_magnitude.MinAdjustmentMagnitude"
    ]
    """<p>The minimum value to scale by when the adjustment type is <code>PercentChangeInCapacity</code>. </p>"""
    scaling_adjustment: NotRequired[
        "capo_auto_scaling.types.policy_increment.PolicyIncrement"
    ]
    """<p>The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity.</p>"""
    cooldown: NotRequired["capo_auto_scaling.types.cooldown.Cooldown"]
    """<p>The duration of the policy's cooldown period, in seconds.</p>"""
    step_adjustments: NotRequired[
        "capo_auto_scaling.types.step_adjustments.StepAdjustments"
    ]
    """<p>A set of adjustments that enable you to scale based on the size of the alarm breach.</p>"""
    metric_aggregation_type: NotRequired[
        "capo_auto_scaling.types.xml_string_max_len32.XmlStringMaxLen32"
    ]
    """<p>The aggregation type for the CloudWatch metrics. The valid values are <code>Minimum</code>, <code>Maximum</code>, and <code>Average</code>.</p>"""
    estimated_instance_warmup: NotRequired[
        "capo_auto_scaling.types.estimated_instance_warmup.EstimatedInstanceWarmup"
    ]
    """<p>The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.</p>"""
    alarms: NotRequired["capo_auto_scaling.types.alarms.Alarms"]
    """<p>The CloudWatch alarms related to the policy.</p>"""
    target_tracking_configuration: NotRequired[
        "capo_auto_scaling.types.target_tracking_configuration.TargetTrackingConfiguration"
    ]
    """<p>A target tracking scaling policy.</p>"""
    enabled: NotRequired[
        "capo_auto_scaling.types.scaling_policy_enabled.ScalingPolicyEnabled"
    ]
    """<p>Indicates whether the policy is enabled (<code>true</code>) or disabled (<code>false</code>).</p>"""
    predictive_scaling_configuration: NotRequired[
        "capo_auto_scaling.types.predictive_scaling_configuration.PredictiveScalingConfiguration"
    ]
    """<p>A predictive scaling policy.</p>"""

adjustment_type instance-attribute

adjustment_type: NotRequired[XmlStringMaxLen255]

Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

alarms instance-attribute

alarms: NotRequired[Alarms]

The CloudWatch alarms related to the policy.

auto_scaling_group_name instance-attribute

auto_scaling_group_name: NotRequired[XmlStringMaxLen255]

The name of the Auto Scaling group.

cooldown instance-attribute

cooldown: NotRequired[Cooldown]

The duration of the policy's cooldown period, in seconds.

enabled instance-attribute

enabled: NotRequired[ScalingPolicyEnabled]

Indicates whether the policy is enabled (true) or disabled (false).

estimated_instance_warmup instance-attribute

estimated_instance_warmup: NotRequired[EstimatedInstanceWarmup]

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.

metric_aggregation_type instance-attribute

metric_aggregation_type: NotRequired[XmlStringMaxLen32]

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average.

min_adjustment_magnitude instance-attribute

min_adjustment_magnitude: NotRequired[MinAdjustmentMagnitude]

The minimum value to scale by when the adjustment type is PercentChangeInCapacity.

min_adjustment_step instance-attribute

min_adjustment_step: NotRequired[MinAdjustmentStep]

Available for backward compatibility. Use MinAdjustmentMagnitude instead.

policy_arn instance-attribute

policy_arn: NotRequired[ResourceName]

The Amazon Resource Name (ARN) of the policy.

policy_name instance-attribute

policy_name: NotRequired[XmlStringMaxLen255]

The name of the scaling policy.

policy_type instance-attribute

policy_type: NotRequired[XmlStringMaxLen64]

One of the following policy types:

  • TargetTrackingScaling

  • StepScaling

  • SimpleScaling (default)

  • PredictiveScaling

For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.

predictive_scaling_configuration instance-attribute

predictive_scaling_configuration: NotRequired[PredictiveScalingConfiguration]

A predictive scaling policy.

scaling_adjustment instance-attribute

scaling_adjustment: NotRequired[PolicyIncrement]

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity.

step_adjustments instance-attribute

step_adjustments: NotRequired[StepAdjustments]

A set of adjustments that enable you to scale based on the size of the alarm breach.

target_tracking_configuration instance-attribute

target_tracking_configuration: NotRequired[TargetTrackingConfiguration]

A target tracking scaling policy.