Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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.
Synopsis
- data QueryForecast = QueryForecast' {}
- newQueryForecast :: Text -> QueryForecast
- queryForecast_endDate :: Lens' QueryForecast (Maybe Text)
- queryForecast_startDate :: Lens' QueryForecast (Maybe Text)
- queryForecast_nextToken :: Lens' QueryForecast (Maybe Text)
- queryForecast_forecastArn :: Lens' QueryForecast Text
- queryForecast_filters :: Lens' QueryForecast (HashMap Text Text)
- data QueryForecastResponse = QueryForecastResponse' {
- forecast :: Maybe Forecast
- httpStatus :: Int
- newQueryForecastResponse :: Int -> QueryForecastResponse
- queryForecastResponse_forecast :: Lens' QueryForecastResponse (Maybe Forecast)
- queryForecastResponse_httpStatus :: Lens' QueryForecastResponse Int
Creating a Request
data QueryForecast Source #
See: newQueryForecast
smart constructor.
QueryForecast' | |
|
Instances
Create a value of QueryForecast
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:endDate:QueryForecast'
, queryForecast_endDate
- The end date for the forecast. Specify the date using this format:
yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example,
2015-01-01T20:00:00.
$sel:startDate:QueryForecast'
, queryForecast_startDate
- The start date for the forecast. Specify the date using this format:
yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example,
2015-01-01T08:00:00.
$sel:nextToken:QueryForecast'
, queryForecast_nextToken
- If the result of the previous request was truncated, the response
includes a NextToken
. To retrieve the next set of results, use the
token in the next request. Tokens expire after 24 hours.
$sel:forecastArn:QueryForecast'
, queryForecast_forecastArn
- The Amazon Resource Name (ARN) of the forecast to query.
$sel:filters:QueryForecast'
, queryForecast_filters
- The filtering criteria to apply when retrieving the forecast. For
example, to get the forecast for client_21
in the electricity usage
dataset, specify the following:
{"item_id" : "client_21"}
To get the full forecast, use the CreateForecastExportJob operation.
Request Lenses
queryForecast_endDate :: Lens' QueryForecast (Maybe Text) Source #
The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00.
queryForecast_startDate :: Lens' QueryForecast (Maybe Text) Source #
The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00.
queryForecast_nextToken :: Lens' QueryForecast (Maybe Text) Source #
If the result of the previous request was truncated, the response
includes a NextToken
. To retrieve the next set of results, use the
token in the next request. Tokens expire after 24 hours.
queryForecast_forecastArn :: Lens' QueryForecast Text Source #
The Amazon Resource Name (ARN) of the forecast to query.
queryForecast_filters :: Lens' QueryForecast (HashMap Text Text) Source #
The filtering criteria to apply when retrieving the forecast. For
example, to get the forecast for client_21
in the electricity usage
dataset, specify the following:
{"item_id" : "client_21"}
To get the full forecast, use the CreateForecastExportJob operation.
Destructuring the Response
data QueryForecastResponse Source #
See: newQueryForecastResponse
smart constructor.
QueryForecastResponse' | |
|
Instances
newQueryForecastResponse Source #
Create a value of QueryForecastResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:forecast:QueryForecastResponse'
, queryForecastResponse_forecast
- The forecast.
$sel:httpStatus:QueryForecastResponse'
, queryForecastResponse_httpStatus
- The response's http status code.
Response Lenses
queryForecastResponse_forecast :: Lens' QueryForecastResponse (Maybe Forecast) Source #
The forecast.
queryForecastResponse_httpStatus :: Lens' QueryForecastResponse Int Source #
The response's http status code.