Skip to content

QueryForecast

Source: src/AWS/Forecast/QueryForecast.ts

Runtime binding for forecast:QueryForecast — the Forecast Query data plane. Retrieves the predicted time series for a single item from a generated forecast, the call an API or personalization function makes to serve predictions.

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

// init
const queryForecast = yield* AWS.Forecast.QueryForecast();
// runtime
const { Forecast } = yield* queryForecast({
ForecastArn: forecastArn,
Filters: { item_id: "sku_1234" },
});
const p50 = Forecast?.Predictions?.p50 ?? [];