Skip to content

aws.autoscaling.describe_policies

Example SQL Queries

SELECT * FROM
aws.autoscaling.describe_policies;

Description

Gets information about the scaling policies in the account and Region.

Table Definition

Column NameColumn Data Type
auto_scaling_group_name Input Column

The name of the Auto Scaling group.

VARCHAR
policy_names Input Column

The names of one or more policies. If you omit this property, all policies are described. If a group name is provided, the results are limited to that group. If you specify an unknown policy name, it is ignored with no error.

Array Members: Maximum number of 50 items.

VARCHAR[]
Show child fields
policy_names[]
policy_types Input Column

One or more policy types. The valid values are SimpleScaling, StepScaling, TargetTrackingScaling, and PredictiveScaling.

VARCHAR[]
Show child fields
policy_types[]
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
adjustment_type

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

VARCHAR
alarms

The CloudWatch alarms related to the policy.

STRUCT(
"alarm_name" VARCHAR,
"alarm_arn" VARCHAR
)[]
Show child fields
alarms[]
Show child fields
alarms[].alarm_arn

The Amazon Resource Name (ARN) of the alarm.

alarms[].alarm_name

The name of the alarm.

cooldown

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

BIGINT
enabled

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

BOOLEAN
estimated_instance_warmup

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

BIGINT
metric_aggregation_type

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

VARCHAR
min_adjustment_magnitude

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

BIGINT
min_adjustment_step

Available for backward compatibility. Use MinAdjustmentMagnitude instead.

BIGINT
policy_arn

The Amazon Resource Name (ARN) of the policy.

VARCHAR
policy_name

The name of the scaling policy.

VARCHAR
policy_type

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.

VARCHAR
predictive_scaling_configuration

A predictive scaling policy.

STRUCT(
"metric_specifications" STRUCT(
"target_value" DOUBLE,
"predefined_metric_pair_specification" STRUCT(
"predefined_metric_type" VARCHAR,
"resource_label" VARCHAR
),
"predefined_scaling_metric_specification" STRUCT(
"predefined_metric_type" VARCHAR,
"resource_label" VARCHAR
),
"predefined_load_metric_specification" STRUCT(
"predefined_metric_type" VARCHAR,
"resource_label" VARCHAR
),
"customized_scaling_metric_specification" STRUCT(
"metric_data_queries" STRUCT(
"id" VARCHAR,
"expression" VARCHAR,
"metric_stat" STRUCT(
"metric" STRUCT(
"namespace" VARCHAR,
"metric_name" VARCHAR,
"dimensions" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
),
"stat" VARCHAR,
"unit" VARCHAR
),
"label" VARCHAR,
"return_data" BOOLEAN
)[]
),
"customized_load_metric_specification" STRUCT(
"metric_data_queries" STRUCT(
"id" VARCHAR,
"expression" VARCHAR,
"metric_stat" STRUCT(
"metric" STRUCT(
"namespace" VARCHAR,
"metric_name" VARCHAR,
"dimensions" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
),
"stat" VARCHAR,
"unit" VARCHAR
),
"label" VARCHAR,
"return_data" BOOLEAN
)[]
),
"customized_capacity_metric_specification" STRUCT(
"metric_data_queries" STRUCT(
"id" VARCHAR,
"expression" VARCHAR,
"metric_stat" STRUCT(
"metric" STRUCT(
"namespace" VARCHAR,
"metric_name" VARCHAR,
"dimensions" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
),
"stat" VARCHAR,
"unit" VARCHAR
),
"label" VARCHAR,
"return_data" BOOLEAN
)[]
)
)[],
"mode" VARCHAR,
"scheduling_buffer_time" BIGINT,
"max_capacity_breach_behavior" VARCHAR,
"max_capacity_buffer" BIGINT
)
Show child fields
predictive_scaling_configuration.max_capacity_breach_behavior

Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Defaults to HonorMaxCapacity if not specified.

The following are possible values:

  • HonorMaxCapacity - Amazon EC2 Auto Scaling can't increase the maximum capacity of the group when the forecast capacity is close to or exceeds the maximum capacity.

  • IncreaseMaxCapacity - Amazon EC2 Auto Scaling can increase the maximum capacity of the group when the forecast capacity is close to or exceeds the maximum capacity. The upper limit is determined by the forecasted capacity and the value for MaxCapacityBuffer.

Use caution when allowing the maximum capacity to be automatically increased. This can lead to more instances being launched than intended if the increased maximum capacity is not monitored and managed. The increased maximum capacity then becomes the new normal maximum capacity for the Auto Scaling group until you manually update it. The maximum capacity does not automatically decrease back to the original maximum.

predictive_scaling_configuration.max_capacity_buffer

The size of the capacity buffer to use when the forecast capacity is close to or exceeds the maximum capacity. The value is specified as a percentage relative to the forecast capacity. For example, if the buffer is 10, this means a 10 percent buffer, such that if the forecast capacity is 50, and the maximum capacity is 40, then the effective maximum capacity is 55.

If set to 0, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity.

Required if the MaxCapacityBreachBehavior property is set to IncreaseMaxCapacity, and cannot be used otherwise.

predictive_scaling_configuration.metric_specifications[]
Show child fields
predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification

The customized capacity metric specification.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[]
Show child fields
predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].expression

The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id of the other metrics to refer to those metrics, and can also use the Id of other expressions to use the result of those expressions.

Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].id

A short name that identifies the object's results in the response. This name must be unique among all MetricDataQuery objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].label

A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat

Information about the metric data to return.

Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat.metric

The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[]
Show child fields
predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[].name

The name of the dimension.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[].value

The value of the dimension.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat.metric.metric_name

The name of the metric.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat.metric.namespace

The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat.stat

The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.

The most commonly used metrics for predictive scaling are Average and Sum.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].metric_stat.unit

The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.

predictive_scaling_configuration.metric_specifications[].customized_capacity_metric_specification.metric_data_queries[].return_data

Indicates whether to return the timestamps and raw data values of this metric.

If you use any math expressions, specify true for this value for only the final math expression that the metric specification is based on. You must specify false for ReturnData for all the other metrics and expressions used in the metric specification.

If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData. This sets it to its default (true).

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification

The customized load metric specification.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[]
Show child fields
predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].expression

The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id of the other metrics to refer to those metrics, and can also use the Id of other expressions to use the result of those expressions.

Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].id

A short name that identifies the object's results in the response. This name must be unique among all MetricDataQuery objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].label

A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat

Information about the metric data to return.

Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat.metric

The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[]
Show child fields
predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[].name

The name of the dimension.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[].value

The value of the dimension.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat.metric.metric_name

The name of the metric.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat.metric.namespace

The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat.stat

The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.

The most commonly used metrics for predictive scaling are Average and Sum.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].metric_stat.unit

The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.

predictive_scaling_configuration.metric_specifications[].customized_load_metric_specification.metric_data_queries[].return_data

Indicates whether to return the timestamps and raw data values of this metric.

If you use any math expressions, specify true for this value for only the final math expression that the metric specification is based on. You must specify false for ReturnData for all the other metrics and expressions used in the metric specification.

If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData. This sets it to its default (true).

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification

The customized scaling metric specification.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[]
Show child fields
predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].expression

The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id of the other metrics to refer to those metrics, and can also use the Id of other expressions to use the result of those expressions.

Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].id

A short name that identifies the object's results in the response. This name must be unique among all MetricDataQuery objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].label

A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat

Information about the metric data to return.

Conditional: Within each MetricDataQuery object, you must specify either Expression or MetricStat, but not both.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat.metric

The CloudWatch metric to return, including the metric name, namespace, and dimensions. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.

Show child fields
predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[]
Show child fields
predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[].name

The name of the dimension.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat.metric.dimensions[].value

The value of the dimension.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat.metric.metric_name

The name of the metric.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat.metric.namespace

The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat.stat

The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.

The most commonly used metrics for predictive scaling are Average and Sum.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].metric_stat.unit

The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.

predictive_scaling_configuration.metric_specifications[].customized_scaling_metric_specification.metric_data_queries[].return_data

Indicates whether to return the timestamps and raw data values of this metric.

If you use any math expressions, specify true for this value for only the final math expression that the metric specification is based on. You must specify false for ReturnData for all the other metrics and expressions used in the metric specification.

If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData. This sets it to its default (true).

predictive_scaling_configuration.metric_specifications[].predefined_load_metric_specification

The predefined load metric specification.

Show child fields
predictive_scaling_configuration.metric_specifications[].predefined_load_metric_specification.predefined_metric_type

The metric type.

predictive_scaling_configuration.metric_specifications[].predefined_load_metric_specification.resource_label

A label that uniquely identifies a specific Application Load Balancer target group from which to determine the request count served by your Auto Scaling group. You can't specify a resource label unless the target group is attached to the Auto Scaling group.

You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). The format of the resource label is:

app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff.

Where:

  • app/<load-balancer-name>/<load-balancer-id> is the final portion of the load balancer ARN

  • targetgroup/<target-group-name>/<target-group-id> is the final portion of the target group ARN.

To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use the DescribeTargetGroups API operation.

predictive_scaling_configuration.metric_specifications[].predefined_metric_pair_specification

The predefined metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.

Show child fields
predictive_scaling_configuration.metric_specifications[].predefined_metric_pair_specification.predefined_metric_type

Indicates which metrics to use. There are two different types of metrics for each metric type: one is a load metric and one is a scaling metric. For example, if the metric type is ASGCPUUtilization, the Auto Scaling group's total CPU metric is used as the load metric, and the average CPU metric is used for the scaling metric.

predictive_scaling_configuration.metric_specifications[].predefined_metric_pair_specification.resource_label

A label that uniquely identifies a specific Application Load Balancer target group from which to determine the total and average request count served by your Auto Scaling group. You can't specify a resource label unless the target group is attached to the Auto Scaling group.

You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). The format of the resource label is:

app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff.

Where:

  • app/<load-balancer-name>/<load-balancer-id> is the final portion of the load balancer ARN

  • targetgroup/<target-group-name>/<target-group-id> is the final portion of the target group ARN.

To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use the DescribeTargetGroups API operation.

predictive_scaling_configuration.metric_specifications[].predefined_scaling_metric_specification

The predefined scaling metric specification.

Show child fields
predictive_scaling_configuration.metric_specifications[].predefined_scaling_metric_specification.predefined_metric_type

The metric type.

predictive_scaling_configuration.metric_specifications[].predefined_scaling_metric_specification.resource_label

A label that uniquely identifies a specific Application Load Balancer target group from which to determine the average request count served by your Auto Scaling group. You can't specify a resource label unless the target group is attached to the Auto Scaling group.

You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). The format of the resource label is:

app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff.

Where:

  • app/<load-balancer-name>/<load-balancer-id> is the final portion of the load balancer ARN

  • targetgroup/<target-group-name>/<target-group-id> is the final portion of the target group ARN.

To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use the DescribeTargetGroups API operation.

predictive_scaling_configuration.metric_specifications[].target_value

Specifies the target utilization.

Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.

predictive_scaling_configuration.mode

The predictive scaling mode. Defaults to ForecastOnly if not specified.

predictive_scaling_configuration.scheduling_buffer_time

The amount of time, in seconds, by which the instance launch time can be advanced. For example, the forecast says to add capacity at 10:00 AM, and you choose to pre-launch instances by 5 minutes. In that case, the instances will be launched at 9:55 AM. The intention is to give resources time to be provisioned. It can take a few minutes to launch an EC2 instance. The actual amount of time required depends on several factors, such as the size of the instance and whether there are startup scripts to complete.

The value must be less than the forecast interval duration of 3600 seconds (60 minutes). Defaults to 300 seconds if not specified.

scaling_adjustment

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.

BIGINT
step_adjustments

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

STRUCT(
"metric_interval_lower_bound" DOUBLE,
"metric_interval_upper_bound" DOUBLE,
"scaling_adjustment" BIGINT
)[]
Show child fields
step_adjustments[]
Show child fields
step_adjustments[].metric_interval_lower_bound

The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater than or equal to the threshold plus the lower bound). Otherwise, it is exclusive (the metric must be greater than the threshold plus the lower bound). A null value indicates negative infinity.

step_adjustments[].metric_interval_upper_bound

The upper bound for the difference between the alarm threshold and the CloudWatch metric. If the metric value is above the breach threshold, the upper bound is exclusive (the metric must be less than the threshold plus the upper bound). Otherwise, it is inclusive (the metric must be less than or equal to the threshold plus the upper bound). A null value indicates positive infinity.

The upper bound must be greater than the lower bound.

step_adjustments[].scaling_adjustment

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. For exact capacity, you must specify a non-negative value.

target_tracking_configuration

A target tracking scaling policy.

STRUCT(
"predefined_metric_specification" STRUCT(
"predefined_metric_type" VARCHAR,
"resource_label" VARCHAR
),
"customized_metric_specification" STRUCT(
"metric_name" VARCHAR,
"namespace" VARCHAR,
"dimensions" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[],
"statistic" VARCHAR,
"unit" VARCHAR,
"metrics" STRUCT(
"id" VARCHAR,
"expression" VARCHAR,
"metric_stat" STRUCT(
"metric" STRUCT(
"namespace" VARCHAR,
"metric_name" VARCHAR,
"dimensions" STRUCT(
"name" VARCHAR,
"value" VARCHAR
)[]
),
"stat" VARCHAR,
"unit" VARCHAR
),
"label" VARCHAR,
"return_data" BOOLEAN
)[]
),
"target_value" DOUBLE,
"disable_scale_in" BOOLEAN
)
Show child fields
target_tracking_configuration.customized_metric_specification

A customized metric. You must specify either a predefined metric or a customized metric.

Show child fields
target_tracking_configuration.customized_metric_specification.dimensions[]
Show child fields
target_tracking_configuration.customized_metric_specification.dimensions[].name

The name of the dimension.

target_tracking_configuration.customized_metric_specification.dimensions[].value

The value of the dimension.

target_tracking_configuration.customized_metric_specification.metric_name

The name of the metric. To get the exact metric name, namespace, and dimensions, inspect the Metric object that is returned by a call to ListMetrics.

target_tracking_configuration.customized_metric_specification.metrics[]
Show child fields
target_tracking_configuration.customized_metric_specification.metrics[].expression

The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the Id of the other metrics to refer to those metrics, and can also use the Id of other expressions to use the result of those expressions.

Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either Expression or MetricStat, but not both.

target_tracking_configuration.customized_metric_specification.metrics[].id

A short name that identifies the object's results in the response. This name must be unique among all TargetTrackingMetricDataQuery objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.

target_tracking_configuration.customized_metric_specification.metrics[].label

A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.

target_tracking_configuration.customized_metric_specification.metrics[].metric_stat

Information about the metric data to return.

Conditional: Within each TargetTrackingMetricDataQuery object, you must specify either Expression or MetricStat, but not both.

Show child fields
target_tracking_configuration.customized_metric_specification.metrics[].metric_stat.metric

The metric to use.

Show child fields
target_tracking_configuration.customized_metric_specification.metrics[].metric_stat.metric.dimensions[]
Show child fields
target_tracking_configuration.customized_metric_specification.metrics[].metric_stat.metric.dimensions[].name

The name of the dimension.

target_tracking_configuration.customized_metric_specification.metrics[].metric_stat.metric.dimensions[].value

The value of the dimension.

target_tracking_configuration.customized_metric_specification.metrics[].metric_stat.metric.metric_name

The name of the metric.

target_tracking_configuration.customized_metric_specification.metrics[].metric_stat.metric.namespace

The namespace of the metric. For more information, see the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide.

target_tracking_configuration.customized_metric_specification.metrics[].metric_stat.stat

The statistic to return. It can include any CloudWatch statistic or extended statistic. For a list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.

The most commonly used metric for scaling is Average.

target_tracking_configuration.customized_metric_specification.metrics[].metric_stat.unit

The unit to use for the returned data points. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.

target_tracking_configuration.customized_metric_specification.metrics[].return_data

Indicates whether to return the timestamps and raw data values of this metric.

If you use any math expressions, specify true for this value for only the final math expression that the metric specification is based on. You must specify false for ReturnData for all the other metrics and expressions used in the metric specification.

If you are only retrieving metrics and not performing any math expressions, do not specify anything for ReturnData. This sets it to its default (true).

target_tracking_configuration.customized_metric_specification.namespace

The namespace of the metric.

target_tracking_configuration.customized_metric_specification.statistic

The statistic of the metric.

target_tracking_configuration.customized_metric_specification.unit

The unit of the metric. For a complete list of the units that CloudWatch supports, see the MetricDatum data type in the Amazon CloudWatch API Reference.

target_tracking_configuration.disable_scale_in

Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled, the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking scaling policy can remove instances from the Auto Scaling group. The default is false.

target_tracking_configuration.predefined_metric_specification

A predefined metric. You must specify either a predefined metric or a customized metric.

Show child fields
target_tracking_configuration.predefined_metric_specification.predefined_metric_type

The metric type. The following predefined metrics are available:

  • ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling group.

  • ASGAverageNetworkIn - Average number of bytes received on all network interfaces by the Auto Scaling group.

  • ASGAverageNetworkOut - Average number of bytes sent out on all network interfaces by the Auto Scaling group.

  • ALBRequestCountPerTarget - Average Application Load Balancer request count per target for your Auto Scaling group.

target_tracking_configuration.predefined_metric_specification.resource_label

A label that uniquely identifies a specific Application Load Balancer target group from which to determine the average request count served by your Auto Scaling group. You can't specify a resource label unless the target group is attached to the Auto Scaling group.

You create the resource label by appending the final portion of the load balancer ARN and the final portion of the target group ARN into a single value, separated by a forward slash (/). The format of the resource label is:

app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff.

Where:

  • app/<load-balancer-name>/<load-balancer-id> is the final portion of the load balancer ARN

  • targetgroup/<target-group-name>/<target-group-id> is the final portion of the target group ARN.

To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers API operation. To find the ARN for the target group, use the DescribeTargetGroups API operation.

target_tracking_configuration.target_value

The target value for the metric.

Some metrics are based on a count instead of a percentage, such as the request count for an Application Load Balancer or the number of messages in an SQS queue. If the scaling policy specifies one of these metrics, specify the target utilization as the optimal average request or message count per instance during any one-minute interval.