Skip to content

Get Predictive Scaling Forecast

autoscaling_get_predictive_scaling_forecast R Documentation

Retrieves the forecast data for a predictive scaling policy

Description

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.

Usage

autoscaling_get_predictive_scaling_forecast(AutoScalingGroupName,
  PolicyName, StartTime, EndTime)

Arguments

AutoScalingGroupName

[required] The name of the Auto Scaling group.

PolicyName

[required] The name of the policy.

StartTime

[required] 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.

EndTime

[required] 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.

Value

A list with the following syntax:

list(
  LoadForecast = list(
    list(
      Timestamps = list(
        as.POSIXct(
          "2015-01-01"
        )
      ),
      Values = list(
        123.0
      ),
      MetricSpecification = list(
        TargetValue = 123.0,
        PredefinedMetricPairSpecification = list(
          PredefinedMetricType = "ASGCPUUtilization"|"ASGNetworkIn"|"ASGNetworkOut"|"ALBRequestCount",
          ResourceLabel = "string"
        ),
        PredefinedScalingMetricSpecification = list(
          PredefinedMetricType = "ASGAverageCPUUtilization"|"ASGAverageNetworkIn"|"ASGAverageNetworkOut"|"ALBRequestCountPerTarget",
          ResourceLabel = "string"
        ),
        PredefinedLoadMetricSpecification = list(
          PredefinedMetricType = "ASGTotalCPUUtilization"|"ASGTotalNetworkIn"|"ASGTotalNetworkOut"|"ALBTargetGroupRequestCount",
          ResourceLabel = "string"
        ),
        CustomizedScalingMetricSpecification = list(
          MetricDataQueries = list(
            list(
              Id = "string",
              Expression = "string",
              MetricStat = list(
                Metric = list(
                  Namespace = "string",
                  MetricName = "string",
                  Dimensions = list(
                    list(
                      Name = "string",
                      Value = "string"
                    )
                  )
                ),
                Stat = "string",
                Unit = "string"
              ),
              Label = "string",
              ReturnData = TRUE|FALSE
            )
          )
        ),
        CustomizedLoadMetricSpecification = list(
          MetricDataQueries = list(
            list(
              Id = "string",
              Expression = "string",
              MetricStat = list(
                Metric = list(
                  Namespace = "string",
                  MetricName = "string",
                  Dimensions = list(
                    list(
                      Name = "string",
                      Value = "string"
                    )
                  )
                ),
                Stat = "string",
                Unit = "string"
              ),
              Label = "string",
              ReturnData = TRUE|FALSE
            )
          )
        ),
        CustomizedCapacityMetricSpecification = list(
          MetricDataQueries = list(
            list(
              Id = "string",
              Expression = "string",
              MetricStat = list(
                Metric = list(
                  Namespace = "string",
                  MetricName = "string",
                  Dimensions = list(
                    list(
                      Name = "string",
                      Value = "string"
                    )
                  )
                ),
                Stat = "string",
                Unit = "string"
              ),
              Label = "string",
              ReturnData = TRUE|FALSE
            )
          )
        )
      )
    )
  ),
  CapacityForecast = list(
    Timestamps = list(
      as.POSIXct(
        "2015-01-01"
      )
    ),
    Values = list(
      123.0
    )
  ),
  UpdateTime = as.POSIXct(
    "2015-01-01"
  )
)

Request syntax

svc$get_predictive_scaling_forecast(
  AutoScalingGroupName = "string",
  PolicyName = "string",
  StartTime = as.POSIXct(
    "2015-01-01"
  ),
  EndTime = as.POSIXct(
    "2015-01-01"
  )
)