选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

GetPredictiveScalingForecast - Application Auto Scaling
此页面尚未翻译为您的语言。 请求翻译

GetPredictiveScalingForecast

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.

Request Syntax

{ "EndTime": number, "PolicyName": "string", "ResourceId": "string", "ScalableDimension": "string", "ServiceNamespace": "string", "StartTime": number }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

EndTime

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.

Type: Timestamp

Required: Yes

PolicyName

The name of the policy.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: \p{Print}+

Required: Yes

ResourceId

The identifier of the resource.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

ScalableDimension

The scalable dimension.

Type: String

Valid Values: ecs:service:DesiredCount | ec2:spot-fleet-request:TargetCapacity | elasticmapreduce:instancegroup:InstanceCount | appstream:fleet:DesiredCapacity | dynamodb:table:ReadCapacityUnits | dynamodb:table:WriteCapacityUnits | dynamodb:index:ReadCapacityUnits | dynamodb:index:WriteCapacityUnits | rds:cluster:ReadReplicaCount | sagemaker:variant:DesiredInstanceCount | custom-resource:ResourceType:Property | comprehend:document-classifier-endpoint:DesiredInferenceUnits | comprehend:entity-recognizer-endpoint:DesiredInferenceUnits | lambda:function:ProvisionedConcurrency | cassandra:table:ReadCapacityUnits | cassandra:table:WriteCapacityUnits | kafka:broker-storage:VolumeSize | elasticache:replication-group:NodeGroups | elasticache:replication-group:Replicas | neptune:cluster:ReadReplicaCount | sagemaker:variant:DesiredProvisionedConcurrency | sagemaker:inference-component:DesiredCopyCount | workspaces:workspacespool:DesiredUserSessions

Required: Yes

ServiceNamespace

The namespace of the AWS service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.

Type: String

Valid Values: ecs | elasticmapreduce | ec2 | appstream | dynamodb | rds | sagemaker | custom-resource | comprehend | lambda | cassandra | kafka | elasticache | neptune | workspaces

Required: Yes

StartTime

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

Type: Timestamp

Required: Yes

Response Syntax

{ "CapacityForecast": { "Timestamps": [ number ], "Values": [ number ] }, "LoadForecast": [ { "MetricSpecification": { "CustomizedCapacityMetricSpecification": { "MetricDataQueries": [ { "Expression": "string", "Id": "string", "Label": "string", "MetricStat": { "Metric": { "Dimensions": [ { "Name": "string", "Value": "string" } ], "MetricName": "string", "Namespace": "string" }, "Stat": "string", "Unit": "string" }, "ReturnData": boolean } ] }, "CustomizedLoadMetricSpecification": { "MetricDataQueries": [ { "Expression": "string", "Id": "string", "Label": "string", "MetricStat": { "Metric": { "Dimensions": [ { "Name": "string", "Value": "string" } ], "MetricName": "string", "Namespace": "string" }, "Stat": "string", "Unit": "string" }, "ReturnData": boolean } ] }, "CustomizedScalingMetricSpecification": { "MetricDataQueries": [ { "Expression": "string", "Id": "string", "Label": "string", "MetricStat": { "Metric": { "Dimensions": [ { "Name": "string", "Value": "string" } ], "MetricName": "string", "Namespace": "string" }, "Stat": "string", "Unit": "string" }, "ReturnData": boolean } ] }, "PredefinedLoadMetricSpecification": { "PredefinedMetricType": "string", "ResourceLabel": "string" }, "PredefinedMetricPairSpecification": { "PredefinedMetricType": "string", "ResourceLabel": "string" }, "PredefinedScalingMetricSpecification": { "PredefinedMetricType": "string", "ResourceLabel": "string" }, "TargetValue": number }, "Timestamps": [ number ], "Values": [ number ] } ], "UpdateTime": number }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CapacityForecast

The capacity forecast.

Type: CapacityForecast object

LoadForecast

The load forecast.

Type: Array of LoadForecast objects

UpdateTime

The time the forecast was made.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceException

The service encountered an internal error.

HTTP Status Code: 400

ValidationException

An exception was thrown for a validation issue. Review the available parameters for the API request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。