Skip to content

QueryWhatIfForecast

Source: src/AWS/Forecast/QueryWhatIfForecast.ts

Runtime binding for forecast:QueryWhatIfForecast — retrieve the predicted time series for a single item from a what-if forecast, so an application can compare a scenario (price change, promotion) against the baseline served by QueryForecast.

What-if forecast ARNs are created at runtime, so the binding takes no arguments and grants forecast:QueryWhatIfForecast on *. Provide the implementation with Effect.provide(AWS.Forecast.QueryWhatIfForecastHttp).

// init
const queryWhatIfForecast = yield* AWS.Forecast.QueryWhatIfForecast();
// runtime
const { Forecast } = yield* queryWhatIfForecast({
WhatIfForecastArn: whatIfForecastArn,
Filters: { item_id: "sku_1234" },
});