Note: You are viewing the documentation for an older major version of the AWS SDK for JavaScript (v2).
The modular AWS SDK for JavaScript (v3) is now General Available. For more information see the Developer Guide or API Reference.
Class: AWS.ForecastQueryService
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.ForecastQueryService
- Identifier:
- forecastqueryservice
- API Version:
- 2018-06-26
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Provides APIs for creating and managing Amazon Forecast resources.
Sending a Request Using ForecastQueryService
var forecastqueryservice = new AWS.ForecastQueryService();
forecastqueryservice.queryForecast(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the ForecastQueryService object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var forecastqueryservice = new AWS.ForecastQueryService({apiVersion: '2018-06-26'});
You can also set the API version globally in AWS.config.apiVersions
using
the forecastqueryservice service identifier:
AWS.config.apiVersions = {
forecastqueryservice: '2018-06-26',
// other service API versions
};
var forecastqueryservice = new AWS.ForecastQueryService();
Constructor Summary
-
new AWS.ForecastQueryService(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary
-
queryForecast(params = {}, callback) ⇒ AWS.Request
Retrieves a forecast for a single item, filtered by the supplied criteria.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
Property Details
Method Details
queryForecast(params = {}, callback) ⇒ AWS.Request
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.