Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
version: 1.0.0
x-release: v4
title: 'Auto Scaling #Action=AttachInstances #Action=AttachInstances #Action=PutScalingPolicy #Action=Put Scaling Policy #Action=Put Scaling Policy API'
description: <fullname>Amazon EC2 Auto Scaling</fullname> <p>Amazon EC2 Auto Scaling is designed to automatically launch and terminate EC2 instances based on user-defined scaling policies, scheduled actions, and health checks.</p> <p>For more information, see the <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/">Amazon EC2 Auto Scaling User Guide</a> and the <a href="https://docs.aws.amazon.com/autoscaling/ec2/APIReference/Welcome.html">Amazon EC2 Auto Scaling API Reference</a>.</p>
x-logo:
url: https://api.apis.guru/v2/cache/logo/https_twitter.com_awscloud_profile_image.png
backgroundColor: '#FFFFFF'
termsOfService: https://aws.amazon.com/service-terms/
contact:
name: Mike Ralphson
email: mike.ralphson@gmail.com
url: https://github.com/mermade/aws2openapi
x-twitter: PermittedSoc
license:
name: Apache 2.0 License
url: http://www.apache.org/licenses/
x-providerName: amazonaws.com
x-serviceName: autoscaling
x-origin:
- contentType: application/json
url: https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/autoscaling-2011-01-01.normal.json
converter:
url: https://github.com/mermade/aws2openapi
x-apisguru-driver: external
x-apiClientRegistration:
url: https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct
x-apisguru-categories:
- cloud
x-preferred: true
servers:
- url: http://autoscaling.{region}.amazonaws.com
variables:
region:
description: The AWS region
enum:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- us-gov-west-1
- us-gov-east-1
- ca-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- eu-central-1
- eu-south-1
- af-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- ap-south-1
- sa-east-1
- me-south-1
default: us-east-1
description: The Auto Scaling multi-region endpoint
- url: https://autoscaling.{region}.amazonaws.com
variables:
region:
description: The AWS region
enum:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- us-gov-west-1
- us-gov-east-1
- ca-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- eu-central-1
- eu-south-1
- af-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- ap-south-1
- sa-east-1
- me-south-1
default: us-east-1
description: The Auto Scaling multi-region endpoint
- url: http://autoscaling.amazonaws.com
variables: {}
description: The general Auto Scaling endpoint for US East (N. Virginia)
- url: https://autoscaling.amazonaws.com
variables: {}
description: The general Auto Scaling endpoint for US East (N. Virginia)
- url: http://autoscaling.{region}.amazonaws.com.cn
variables:
region:
description: The AWS region
enum:
- cn-north-1
- cn-northwest-1
default: cn-north-1
description: The Auto Scaling endpoint for China (Beijing) and China (Ningxia)
- url: https://autoscaling.{region}.amazonaws.com.cn
variables:
region:
description: The AWS region
enum:
- cn-north-1
- cn-northwest-1
default: cn-north-1
description: The Auto Scaling endpoint for China (Beijing) and China (Ningxia)
security:
- hmac: []
tags:
- name: '#Action=PutScalingPolicy'
paths:
/#Action=PutScalingPolicy:
parameters:
- $ref: '#/components/parameters/X-Amz-Content-Sha256'
- $ref: '#/components/parameters/X-Amz-Date'
- $ref: '#/components/parameters/X-Amz-Algorithm'
- $ref: '#/components/parameters/X-Amz-Credential'
- $ref: '#/components/parameters/X-Amz-Security-Token'
- $ref: '#/components/parameters/X-Amz-Signature'
- $ref: '#/components/parameters/X-Amz-SignedHeaders'
get:
x-aws-operation-name: PutScalingPolicy
operationId: GET_PutScalingPolicy
description: <p>Creates or updates a scaling policy for an Auto Scaling group. Scaling policies are used to scale an Auto Scaling group based on configurable metrics. If no policies are defined, the dynamic scaling and predictive scaling features are not used. </p> <p>For more information about using dynamic scaling, 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> <p>For more information about using predictive scaling, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-predictive-scaling.html">Predictive scaling for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p> <p>You can view the scaling policies for an Auto Scaling group using the <a>DescribePolicies</a> API call. If you are no longer using a scaling policy, you can delete it by calling the <a>DeletePolicy</a> API.</p>
responses:
'200':
description: Success
content:
text/xml:
schema:
$ref: '#/components/schemas/PolicyARNType'
examples:
GET_PutScalingPolicy200Example:
summary: Default GET_PutScalingPolicy 200 response
x-microcks-default: true
value:
PolicyARN: arn:aws:service:us-east-1:123456789012:resource/example
Alarms: example-string
'480':
description: LimitExceededFault
content:
text/xml:
schema:
$ref: '#/components/schemas/LimitExceededFault'
examples:
GET_PutScalingPolicy480Example:
summary: Default GET_PutScalingPolicy 480 response
x-microcks-default: true
value: {}
'481':
description: ResourceContentionFault
content:
text/xml:
schema:
$ref: '#/components/schemas/ResourceContentionFault'
examples:
GET_PutScalingPolicy481Example:
summary: Default GET_PutScalingPolicy 481 response
x-microcks-default: true
value: {}
'482':
description: ServiceLinkedRoleFailure
content:
text/xml:
schema:
$ref: '#/components/schemas/ServiceLinkedRoleFailure'
parameters:
- name: AutoScalingGroupName
in: query
required: true
description: The name of the Auto Scaling group.
schema:
type: string
minLength: 1
maxLength: 255
x-pattern: '[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*'
- name: PolicyName
in: query
required: true
description: The name of the policy.
schema:
type: string
minLength: 1
maxLength: 255
x-pattern: '[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*'
- name: PolicyType
in: query
required: false
description: '<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>'
schema:
type: string
minLength: 1
maxLength: 64
x-pattern: '[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*'
- name: AdjustmentType
in: query
required: false
description: <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> <p>Required if the policy type is <code>StepScaling</code> or <code>SimpleScaling</code>. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment">Scaling adjustment types</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
schema:
type: string
minLength: 1
maxLength: 255
x-pattern: '[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*'
- name: MinAdjustmentStep
in: query
required: false
description: Available for backward compatibility. Use <code>MinAdjustmentMagnitude</code> instead.
schema:
type: integer
deprecated: true
- name: MinAdjustmentMagnitude
in: query
required: false
description: <p>The minimum value to scale by when the adjustment type is <code>PercentChangeInCapacity</code>. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a <code>MinAdjustmentMagnitude</code> 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 <code>MinAdjustmentMagnitude</code> of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.</p> <p>Valid only if the policy type is <code>StepScaling</code> or <code>SimpleScaling</code>. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment">Scaling adjustment types</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p> <note> <p>Some Auto Scaling groups use instance weights. In this case, set the <code>MinAdjustmentMagnitude</code> to a value that is at least as large as your largest instance weight.</p> </note>
schema:
type: integer
- name: ScalingAdjustment
in: query
required: false
description: <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. For exact capacity, you must specify a positive value.</p> <p>Required if the policy type is <code>SimpleScaling</code>. (Not used with any other policy type.) </p>
schema:
type: integer
- name: Cooldown
in: query
required: false
description: '<p>A cooldown period, in seconds, that applies to a specific simple scaling policy. When a cooldown period is specified here, it overrides the default cooldown.</p> <p>Valid only if the policy type is <code>SimpleScaling</code>. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html">Scaling cooldowns for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p> <p>Default: None</p>'
schema:
type: integer
- name: MetricAggregationType
in: query
required: false
description: <p>The aggregation type for the CloudWatch metrics. The valid values are <code>Minimum</code>, <code>Maximum</code>, and <code>Average</code>. If the aggregation type is null, the value is treated as <code>Average</code>.</p> <p>Valid only if the policy type is <code>StepScaling</code>.</p>
schema:
type: string
minLength: 1
maxLength: 32
x-pattern: '[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*'
- name: StepAdjustments
in: query
required: false
description: <p>A set of adjustments that enable you to scale based on the size of the alarm breach.</p> <p>Required if the policy type is <code>StepScaling</code>. (Not used with any other policy type.) </p>
schema:
type: array
items:
$ref: '#/components/schemas/StepAdjustment'
- name: EstimatedInstanceWarmup
in: query
required: false
description: <p> <i>Not needed if the default instance warmup is defined for the group.</i> </p> <p>The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. This warm-up period applies to instances launched due to a specific target tracking or step scaling policy. When a warm-up period is specified here, it overrides the default instance warmup.</p> <p>Valid only if the policy type is <code>TargetTrackingScaling</code> or <code>StepScaling</code>.</p> <note> <p>The default is to use the value for the default instance warmup defined for the group. If default instance warmup is null, then <code>EstimatedInstanceWarmup</code> falls back to the value of default cooldown.</p> </note>
schema:
type: integer
- name: TargetTrackingConfiguration
in: query
required: false
description: <p>A target tracking scaling policy. Provides support for predefined or custom metrics.</p> <p>The following predefined metrics are available:</p> <ul> <li> <p> <code>ASGAverageCPUUtilization</code> </p> </li> <li> <p> <code>ASGAverageNetworkIn</code> </p> </li> <li> <p> <code>ASGAverageNetworkOut</code> </p> </li> <li> <p> <code>ALBRequestCountPerTarget</code> </p> </li> </ul> <p>If you specify <code>ALBRequestCountPerTarget</code> for the metric, you must specify the <code>ResourceLabel</code> property with the <code>PredefinedMetricSpecification</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_TargetTrackingConfiguration.html">TargetTrackingConfiguration</a> in the <i>Amazon EC2 Auto Scaling API Reference</i>.</p> <p>Required if the policy type is <code>TargetTrackingScaling</code>.</p>
schema:
type: object
required:
- TargetValue
properties:
PredefinedMetricSpecification:
allOf:
- $ref: '#/components/schemas/PredefinedMetricSpecification'
- description: A predefined metric. You must specify either a predefined metric or a customized metric.
CustomizedMetricSpecification:
allOf:
- $ref: '#/components/schemas/CustomizedMetricSpecification'
- description: A customized metric. You must specify either a predefined metric or a customized metric.
TargetValue:
allOf:
- $ref: '#/components/schemas/MetricScale'
- description: <p>The target value for the metric.</p> <note> <p>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. </p> </note>
DisableScaleIn:
allOf:
- $ref: '#/components/schemas/DisableScaleIn'
- description: 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 <code>false</code>.
description: Represents a target tracking scaling policy configuration to use with Amazon EC2 Auto Scaling.
- name: Enabled
in: query
required: false
description: Indicates whether the scaling policy is enabled or disabled. The default is enabled. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enable-disable-scaling-policy.html">Disabling a scaling policy for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.
schema:
type: boolean
- name: PredictiveScalingConfiguration
in: query
required: false
description: <p>A predictive scaling policy. Provides support for predefined and custom metrics.</p> <p>Predefined metrics include CPU utilization, network in/out, and the Application Load Balancer request count.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredictiveScalingConfiguration.html">PredictiveScalingConfiguration</a> in the <i>Amazon EC2 Auto Scaling API Reference</i>.</p> <p>Required if the policy type is <code>PredictiveScaling</code>.</p>
schema:
type: object
required:
- MetricSpecifications
properties:
MetricSpecifications:
allOf:
- $ref: '#/components/schemas/PredictiveScalingMetricSpecifications'
- description: <p>This structure includes the metrics and target utilization to use for predictive scaling. </p> <p>This is an array, but we currently only support a single metric specification. That is, you can specify a target value and a single metric pair, or a target value and one scaling metric and one load metric.</p>
Mode:
allOf:
- $ref: '#/components/schemas/PredictiveScalingMode'
- description: The predictive scaling mode. Defaults to <code>ForecastOnly</code> if not specified.
SchedulingBufferTime:
allOf:
- $ref: '#/components/schemas/PredictiveScalingSchedulingBufferTime'
- description: <p>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. </p> <p>The value must be less than the forecast interval duration of 3600 seconds (60 minutes). Defaults to 300 seconds if not specified. </p>
MaxCapacityBreachBehavior:
allOf:
- $ref: '#/components/schemas/PredictiveScalingMaxCapacityBreachBehavior'
- description: <p>Defines the behavior that should be applied if the forecast capacity approaches or exceeds the maximum capacity of the Auto Scaling group. Defaults to <code>HonorMaxCapacity</code> if not specified.</p> <p>The following are possible values:</p> <ul> <li> <p> <code>HonorMaxCapacity</code> - Amazon EC2 Auto Scaling cannot scale out capacity higher than the maximum capacity. The maximum capacity is enforced as a hard limit. </p> </li> <li> <p> <code>IncreaseMaxCapacity</code> - Amazon EC2 Auto Scaling can scale out capacity higher than the maximum capacity 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 <code>MaxCapacityBuffer</code>.</p> </li> </ul>
MaxCapacityBuffer:
allOf:
- $ref: '#/components/schemas/PredictiveScalingMaxCapacityBuffer'
- description: <p>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.</p> <p>If set to 0, Amazon EC2 Auto Scaling may scale capacity higher than the maximum capacity to equal but not exceed forecast capacity. </p> <p>Required if the <code>MaxCapacityBreachBehavior</code> property is set to <code>IncreaseMaxCapacity</code>, and cannot be used otherwise.</p>
description: Represents a predictive scaling policy configuration to use with Amazon EC2 Auto Scaling.
- name: Action
in: query
required: true
schema:
type: string
enum:
- PutScalingPolicy
- name: Version
in: query
required: true
schema:
type: string
enum:
- 2011-01-01
summary: Amazon EC2 Auto Scaling GET_ Put Scaling Policy
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- '#Action=PutScalingPolicy'
post:
x-aws-operation-name: PutScalingPolicy
operationId: POST_PutScalingPolicy
description: <p>Creates or updates a scaling policy for an Auto Scaling group. Scaling policies are used to scale an Auto Scaling group based on configurable metrics. If no policies are defined, the dynamic scaling and predictive scaling features are not used. </p> <p>For more information about using dynamic scaling, 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> <p>For more information about using predictive scaling, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-predictive-scaling.html">Predictive scaling for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p> <p>You can view the scaling policies for an Auto Scaling group using the <a>DescribePolicies</a> API call. If you are no longer using a scaling policy, you can delete it by calling the <a>DeletePolicy</a> API.</p>
responses:
'200':
description: Success
content:
text/xml:
schema:
$ref: '#/components/schemas/PolicyARNType'
examples:
POST_PutScalingPolicy200Example:
summary: Default POST_PutScalingPolicy 200 response
x-microcks-default: true
value:
PolicyARN: arn:aws:service:us-east-1:123456789012:resource/example
Alarms: example-string
'480':
description: LimitExceededFault
content:
text/xml:
schema:
$ref: '#/components/schemas/LimitExceededFault'
examples:
POST_PutScalingPolicy480Example:
summary: Default POST_PutScalingPolicy 480 response
x-microcks-default: true
value: {}
'481':
description: ResourceContentionFault
content:
text/xml:
schema:
$ref: '#/components/schemas/ResourceContentionFault'
examples:
POST_PutScalingPolicy481Example:
summary: Default POST_PutScalingPolicy 481 response
x-microcks-default: true
value: {}
'482':
description: ServiceLinkedRoleFailure
content:
text/xml:
schema:
$ref: '#/components/schemas/ServiceLinkedRoleFailure'
requestBody:
content:
text/xml:
schema:
$ref: '#/components/schemas/PutScalingPolicyType'
parameters:
- name: Action
in: query
required: true
schema:
type: string
enum:
- PutScalingPolicy
- name: Version
in: query
required: true
schema:
type: string
enum:
- 2011-01-01
summary: Amazon EC2 Auto Scaling POST_ Put Scaling Policy
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- '#Action=PutScalingPolicy'
components:
schemas:
PredictiveScalingMetricSpecification:
type: object
required:
- TargetValue
properties:
TargetValue:
allOf:
- $ref: '#/components/schemas/MetricScale'
- description: <p>Specifies the target utilization.</p> <note> <p>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. </p> </note>
PredefinedMetricPairSpecification:
allOf:
- $ref: '#/components/schemas/PredictiveScalingPredefinedMetricPair'
- description: The predefined metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
PredefinedScalingMetricSpecification:
allOf:
- $ref: '#/components/schemas/PredictiveScalingPredefinedScalingMetric'
- description: The predefined scaling metric specification.
PredefinedLoadMetricSpecification:
allOf:
- $ref: '#/components/schemas/PredictiveScalingPredefinedLoadMetric'
- description: The predefined load metric specification.
CustomizedScalingMetricSpecification:
allOf:
- $ref: '#/components/schemas/PredictiveScalingCustomizedScalingMetric'
- description: The customized scaling metric specification.
CustomizedLoadMetricSpecification:
allOf:
- $ref: '#/components/schemas/PredictiveScalingCustomizedLoadMetric'
- description: The customized load metric specification.
CustomizedCapacityMetricSpecification:
allOf:
- $ref: '#/components/schemas/PredictiveScalingCustomizedCapacityMetric'
- description: The customized capacity metric specification.
description: <p>This structure specifies the metrics and target utilization settings for a predictive scaling policy. </p> <p>You must specify either a metric pair, or a load metric and a scaling metric individually. Specifying a metric pair instead of individual metrics provides a simpler way to configure metrics for a scaling policy. You choose the metric pair, and the policy automatically knows the correct sum and average statistics to use for the load metric and the scaling metric.</p> <p>Example</p> <ul> <li> <p>You create a predictive scaling policy and specify <code>ALBRequestCount</code> as the value for the metric pair and <code>1000.0</code> as the target value. For this type of metric, you must provide the metric dimension for the corresponding target group, so you also provide a resource label for the Application Load Balancer target group that is attached to your Auto Scaling group.</p> </li> <li> <p>The number of requests the target group receives per minute provides the load metric, and the request count averaged between the members of the target group provides the scaling metric. In CloudWatch, this refers to the <code>RequestCount</code> and <code>RequestCountPerTarget</code> metrics, respectively.</p> </li> <li> <p>For optimal use of predictive scaling, you adhere to the best practice of using a dynamic scaling policy to automatically scale between the minimum capacity and maximum capacity in response to real-time changes in resource utilization.</p> </li> <li> <p>Amazon EC2 Auto Scaling consumes data points for the load metric over the last 14 days and creates an hourly load forecast for predictive scaling. (A minimum of 24 hours of data is required.)</p> </li> <li> <p>After creating the load forecast, Amazon EC2 Auto Scaling determines when to reduce or increase the capacity of your Auto Scaling group in each hour of the forecast period so that the average number of requests received by each instance is as close to 1000 requests per minute as possible at all times.</p> </li> </ul> <p>For information about using custom metrics with predictive scaling, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/predictive-scaling-customized-metric-specification.html">Advanced predictive scaling policy configurations using custom metrics</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
MetricDimensions:
type: array
items:
$ref: '#/components/schemas/MetricDimension'
MetricUnit:
type: string
CustomizedMetricSpecification:
type: object
properties:
MetricName:
allOf:
- $ref: '#/components/schemas/MetricName'
- description: The name of the metric. To get the exact metric name, namespace, and dimensions, inspect the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_Metric.html">Metric</a> object that is returned by a call to <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html">ListMetrics</a>.
Namespace:
allOf:
- $ref: '#/components/schemas/MetricNamespace'
- description: The namespace of the metric.
Dimensions:
allOf:
- $ref: '#/components/schemas/MetricDimensions'
- description: '<p>The dimensions of the metric.</p> <p>Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.</p>'
Statistic:
allOf:
- $ref: '#/components/schemas/MetricStatistic'
- description: The statistic of the metric.
Unit:
allOf:
- $ref: '#/components/schemas/MetricUnit'
- description: The unit of the metric. For a complete list of the units that CloudWatch supports, see the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html">MetricDatum</a> data type in the <i>Amazon CloudWatch API Reference</i>.
Metrics:
allOf:
- $ref: '#/components/schemas/TargetTrackingMetricDataQueries'
- description: The metrics to include in the target tracking scaling policy, as a metric data query. This can include both raw metric and metric math expressions.
description: <p>Represents a CloudWatch metric of your choosing for a target tracking scaling policy to use with Amazon EC2 Auto Scaling.</p> <p>To create your customized metric specification:</p> <ul> <li> <p>Add values for each required property from CloudWatch. You can use an existing metric, or a new metric that you create. To use your own metric, you must first publish the metric to CloudWatch. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html">Publish custom metrics</a> in the <i>Amazon CloudWatch User Guide</i>.</p> </li> <li> <p>Choose a metric that changes proportionally with capacity. The value of the metric should increase or decrease in inverse proportion to the number of capacity units. That is, the value of the metric should decrease when capacity increases.</p> </li> </ul> <p>For more information about the CloudWatch terminology below, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html">Amazon CloudWatch concepts</a>.</p> <note> <p>Each individual service provides information about the metrics, namespace, and dimensions they use. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html">Amazon Web Services services that publish CloudWatch metrics</a> in the <i>Amazon CloudWatch User Guide</i>.</p> </note>
MetricDimension:
type: object
required:
- Name
- Value
properties:
Name:
allOf:
- $ref: '#/components/schemas/MetricDimensionName'
- description: The name of the dimension.
Value:
allOf:
- $ref: '#/components/schemas/MetricDimensionValue'
- description: The value of the dimension.
description: Describes the dimension of a metric.
PredefinedMetricPairType:
type: string
enum:
- ASGCPUUtilization
- ASGNetworkIn
- ASGNetworkOut
- ALBRequestCount
XmlStringMaxLen32:
type: string
minLength: 1
maxLength: 32
x-pattern:
# --- truncated at 32 KB (73 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/amazon-ec2-auto-scaling/refs/heads/main/openapi/amazon-ec2-auto-scaling-action-putscalingpolicy-api-openapi.yml