CreateWhatIfForecast
Source:
src/AWS/Forecast/CreateWhatIfForecast.ts
Runtime binding for forecast:CreateWhatIfForecast — create a scenario
forecast under a what-if analysis, transforming the baseline time series
(or replacing it from S3) so the outcome can be compared with
QueryWhatIfForecast.
What-if forecast ARNs are created at runtime, so the binding takes no
arguments and grants forecast:CreateWhatIfForecast on *, plus
iam:PassRole (conditioned to forecast.amazonaws.com) for the
replacement-data-source role. Provide the implementation with
Effect.provide(AWS.Forecast.CreateWhatIfForecastHttp).
What-If Scenarios
Section titled “What-If Scenarios”// initconst createWhatIfForecast = yield* AWS.Forecast.CreateWhatIfForecast();
// runtimeconst scenario = yield* createWhatIfForecast({ WhatIfForecastName: "price_drop_10pct", WhatIfAnalysisArn: analysisArn, TimeSeriesTransformations: [ { Action: { AttributeName: "price", Operation: "MULTIPLY", Value: 0.9, }, }, ],});