Skip to main content

scaling_policy

Gets an individual scaling_policy resource

Overview

Namescaling_policy
TypeResource
Descriptionscaling_policy
Idawscc.autoscaling.scaling_policy

Fields

NameDatatypeDescription
metric_aggregation_typestringThe aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average. Valid only if the policy type is StepScaling.
policy_namestring
policy_typestringOne of the following policy types: TargetTrackingScaling, StepScaling, SimpleScaling (default), PredictiveScaling
predictive_scaling_configurationobjectA predictive scaling policy. Includes support for predefined metrics only.
scaling_adjustmentintegerThe 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. For exact capacity, you must specify a positive value. Required if the policy type is SimpleScaling. (Not used with any other policy type.)
cooldownstringThe duration of the policy's cooldown period, in seconds. When a cooldown period is specified here, it overrides the default cooldown period defined for the Auto Scaling group.
step_adjustmentsarrayA set of adjustments that enable you to scale based on the size of the alarm breach. Required if the policy type is StepScaling. (Not used with any other policy type.)
auto_scaling_group_namestringThe name of the Auto Scaling group.
min_adjustment_magnitudeintegerThe minimum value to scale by when the adjustment type is PercentChangeInCapacity. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.
target_tracking_configurationobjectA target tracking scaling policy. Includes support for predefined or customized metrics.
estimated_instance_warmupintegerThe estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. If not provided, the default is to use the value from the default cooldown period for the Auto Scaling group. Valid only if the policy type is TargetTrackingScaling or StepScaling.
adjustment_typestringSpecifies how the scaling adjustment is interpreted. The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
arnstringThe ARN of the AutoScaling scaling policy
regionstringAWS region.

Methods

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
metric_aggregation_type,
policy_name,
policy_type,
predictive_scaling_configuration,
scaling_adjustment,
cooldown,
step_adjustments,
auto_scaling_group_name,
min_adjustment_magnitude,
target_tracking_configuration,
estimated_instance_warmup,
adjustment_type,
arn
FROM awscc.autoscaling.scaling_policy
WHERE data__Identifier = '<Arn>';

Permissions

To operate on the scaling_policy resource, the following permissions are required:

Read

autoscaling:DescribePolicies

Update

autoscaling:DescribePolicies,
autoscaling:PutScalingPolicy,
cloudwatch:GetMetricData

Delete

autoscaling:DeletePolicy,
autoscaling:DescribePolicies