Skip to content

CreateWhatIfAnalysis

Source: src/AWS/Forecast/CreateWhatIfAnalysis.ts

Runtime binding for forecast:CreateWhatIfAnalysis — start a what-if analysis on a baseline forecast, the container under which scenario forecasts (price changes, promotions) are created and later compared via QueryWhatIfForecast.

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

// init
const createWhatIfAnalysis = yield* AWS.Forecast.CreateWhatIfAnalysis();
// runtime
const analysis = yield* createWhatIfAnalysis({
WhatIfAnalysisName: "promo_scenarios",
ForecastArn: forecastArn,
});