[ aws . autoscaling ]
Retrieves the forecast data for a predictive scaling policy.
Load forecasts are predictions of the hourly load values using historical load data from CloudWatch and an analysis of historical trends. Capacity forecasts are represented as predicted values for the minimum capacity that is needed on an hourly basis, based on the hourly load forecast.
A minimum of 24 hours of data is required to create the initial forecasts. However, having a full 14 days of historical data results in more accurate forecasts.
For more information, see Predictive scaling for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide .
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
get-predictive-scaling-forecast
--auto-scaling-group-name <value>
--policy-name <value>
--start-time <value>
--end-time <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--auto-scaling-group-name
(string)
The name of the Auto Scaling group.
--policy-name
(string)
The name of the policy.
--start-time
(timestamp)
The inclusive start time of the time range for the forecast data to get. At most, the date and time can be one year before the current date and time.
--end-time
(timestamp)
The exclusive end time of the time range for the forecast data to get. The maximum time duration between the start and end time is 30 days.
Although this parameter can accept a date and time that is more than two days in the future, the availability of forecast data has limits. Amazon EC2 Auto Scaling only issues forecasts for periods of two days in advance.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
LoadForecast -> (list)
The load forecast.
(structure)
A
GetPredictiveScalingForecast
call returns the load forecast for a predictive scaling policy. This structure includes the data points for that load forecast, along with the timestamps of those data points and the metric specification.Timestamps -> (list)
The timestamps for the data points, in UTC format.
(timestamp)
Values -> (list)
The values of the data points.
(double)
MetricSpecification -> (structure)
The metric specification for the load forecast.
TargetValue -> (double)
Specifies the target utilization.
Note
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.
PredefinedMetricPairSpecification -> (structure)
The predefined metric pair specification from which Amazon EC2 Auto Scaling determines the appropriate scaling metric and load metric to use.
PredefinedMetricType -> (string)
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.ResourceLabel -> (string)
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.
PredefinedScalingMetricSpecification -> (structure)
The predefined scaling metric specification.
PredefinedMetricType -> (string)
The metric type.
ResourceLabel -> (string)
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.
PredefinedLoadMetricSpecification -> (structure)
The predefined load metric specification.
PredefinedMetricType -> (string)
The metric type.
ResourceLabel -> (string)
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.
CustomizedScalingMetricSpecification -> (structure)
The customized scaling metric specification.
MetricDataQueries -> (list)
One or more metric data queries to provide the data points for a scaling metric. Use multiple metric data queries only if you are performing a math expression on returned data.
(structure)
The metric data to return. Also defines whether this call is returning data for one metric only, or whether it is performing a math expression on the values of returned metric statistics to create a new time series. A time series is a series of data points, each of which is associated with a timestamp.
For more information and examples, see Advanced predictive scaling policy configurations using custom metrics in the Amazon EC2 Auto Scaling User Guide .
Id -> (string)
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.Expression -> (string)
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 theId
of other expressions to use the result of those expressions.Conditional: Within each
MetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.MetricStat -> (structure)
Information about the metric data to return.
Conditional: Within each
MetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.Metric -> (structure)
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 .
Namespace -> (string)
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 .
MetricName -> (string)
The name of the metric.
Dimensions -> (list)
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
(structure)
Describes the dimension of a metric.
Name -> (string)
The name of the dimension.
Value -> (string)
The value of the dimension.
Stat -> (string)
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
andSum
.Unit -> (string)
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 .
Label -> (string)
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.
ReturnData -> (boolean)
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 specifyfalse
forReturnData
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
).CustomizedLoadMetricSpecification -> (structure)
The customized load metric specification.
MetricDataQueries -> (list)
One or more metric data queries to provide the data points for a load metric. Use multiple metric data queries only if you are performing a math expression on returned data.
(structure)
The metric data to return. Also defines whether this call is returning data for one metric only, or whether it is performing a math expression on the values of returned metric statistics to create a new time series. A time series is a series of data points, each of which is associated with a timestamp.
For more information and examples, see Advanced predictive scaling policy configurations using custom metrics in the Amazon EC2 Auto Scaling User Guide .
Id -> (string)
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.Expression -> (string)
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 theId
of other expressions to use the result of those expressions.Conditional: Within each
MetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.MetricStat -> (structure)
Information about the metric data to return.
Conditional: Within each
MetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.Metric -> (structure)
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 .
Namespace -> (string)
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 .
MetricName -> (string)
The name of the metric.
Dimensions -> (list)
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
(structure)
Describes the dimension of a metric.
Name -> (string)
The name of the dimension.
Value -> (string)
The value of the dimension.
Stat -> (string)
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
andSum
.Unit -> (string)
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 .
Label -> (string)
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.
ReturnData -> (boolean)
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 specifyfalse
forReturnData
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
).CustomizedCapacityMetricSpecification -> (structure)
The customized capacity metric specification.
MetricDataQueries -> (list)
One or more metric data queries to provide the data points for a capacity metric. Use multiple metric data queries only if you are performing a math expression on returned data.
(structure)
The metric data to return. Also defines whether this call is returning data for one metric only, or whether it is performing a math expression on the values of returned metric statistics to create a new time series. A time series is a series of data points, each of which is associated with a timestamp.
For more information and examples, see Advanced predictive scaling policy configurations using custom metrics in the Amazon EC2 Auto Scaling User Guide .
Id -> (string)
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.Expression -> (string)
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 theId
of other expressions to use the result of those expressions.Conditional: Within each
MetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.MetricStat -> (structure)
Information about the metric data to return.
Conditional: Within each
MetricDataQuery
object, you must specify eitherExpression
orMetricStat
, but not both.Metric -> (structure)
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 .
Namespace -> (string)
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 .
MetricName -> (string)
The name of the metric.
Dimensions -> (list)
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation available from the table in Amazon Web Services services that publish CloudWatch metrics in the Amazon CloudWatch User Guide .
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
(structure)
Describes the dimension of a metric.
Name -> (string)
The name of the dimension.
Value -> (string)
The value of the dimension.
Stat -> (string)
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
andSum
.Unit -> (string)
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 .
Label -> (string)
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.
ReturnData -> (boolean)
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 specifyfalse
forReturnData
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
).
CapacityForecast -> (structure)
The capacity forecast.
Timestamps -> (list)
The timestamps for the data points, in UTC format.
(timestamp)
Values -> (list)
The values of the data points.
(double)
UpdateTime -> (timestamp)
The time the forecast was made.