AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Retrieves a forecast for a single item, filtered by the supplied criteria.

The criteria is a key-value pair. The key is either item_id (or the equivalent non-timestamp, non-target field) from the TARGET_TIME_SERIES dataset, or one of the forecast dimensions specified as part of the FeaturizationConfig object.

By default, QueryForecast returns the complete date range for the filtered forecast. You can request a specific date range.

To get the full forecast, use the CreateForecastExportJob operation.

The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used to create the predictor.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.7.2 or higher.

Namespace: Amazon.ForecastQueryService
Assembly: AWSSDK.ForecastQueryService.dll
Version: 3.x.y.z

Syntax

C#
public abstract Task<QueryForecastResponse> QueryForecastAsync(
         QueryForecastRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.ForecastQueryService.Model.QueryForecastRequest

Container for the necessary parameters to execute the QueryForecast service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the QueryForecast service method, as returned by ForecastQueryService.

Exceptions

ExceptionCondition
InvalidInputException The value is invalid or is too long.
InvalidNextTokenException The token is not valid. Tokens expire after 24 hours.
LimitExceededException The limit on the number of requests per second has been exceeded.
ResourceInUseException The specified resource is in use.
ResourceNotFoundException We can't find that resource. Check the information that you've provided and try again.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer

See Also