libZSservicesZSamazonka-forecastqueryZSamazonka-forecastquery
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.ForecastQuery.QueryForecast

Description

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

Creating a Request

data QueryForecast Source #

See: newQueryForecast smart constructor.

Constructors

QueryForecast' 

Fields

  • endDate :: Maybe Text

    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.

  • startDate :: Maybe Text

    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.

  • nextToken :: Maybe Text

    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.

  • forecastArn :: Text

    The Amazon Resource Name (ARN) of the forecast to query.

  • filters :: HashMap Text Text

    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.

Instances

Instances details
Eq QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Read QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Show QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Generic QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Associated Types

type Rep QueryForecast :: Type -> Type #

NFData QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Methods

rnf :: QueryForecast -> () #

Hashable QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

ToJSON QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

AWSRequest QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Associated Types

type AWSResponse QueryForecast #

ToHeaders QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

ToPath QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

ToQuery QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

type Rep QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

type Rep QueryForecast = D1 ('MetaData "QueryForecast" "Amazonka.ForecastQuery.QueryForecast" "libZSservicesZSamazonka-forecastqueryZSamazonka-forecastquery" 'False) (C1 ('MetaCons "QueryForecast'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "endDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "startDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "forecastArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "filters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap Text Text))))))
type AWSResponse QueryForecast Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

newQueryForecast Source #

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.

Constructors

QueryForecastResponse' 

Fields

Instances

Instances details
Eq QueryForecastResponse Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Read QueryForecastResponse Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Show QueryForecastResponse Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Generic QueryForecastResponse Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Associated Types

type Rep QueryForecastResponse :: Type -> Type #

NFData QueryForecastResponse Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

Methods

rnf :: QueryForecastResponse -> () #

type Rep QueryForecastResponse Source # 
Instance details

Defined in Amazonka.ForecastQuery.QueryForecast

type Rep QueryForecastResponse = D1 ('MetaData "QueryForecastResponse" "Amazonka.ForecastQuery.QueryForecast" "libZSservicesZSamazonka-forecastqueryZSamazonka-forecastquery" 'False) (C1 ('MetaCons "QueryForecastResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "forecast") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Forecast)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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