1import type * as forecast from "@distilled.cloud/aws/forecast";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `forecast:CreateWhatIfAnalysis` — start a what-if
7 * analysis on a baseline forecast, the container under which scenario
8 * forecasts (price changes, promotions) are created and later compared via
9 * {@link QueryWhatIfForecast}.
10 *
11 * What-if analysis ARNs are created at runtime, so the binding takes no
12 * arguments and grants `forecast:CreateWhatIfAnalysis` on `*`. Provide the
13 * implementation with `Effect.provide(AWS.Forecast.CreateWhatIfAnalysisHttp)`.
14 *
15 * ### What-If Scenarios
16 * **Example:** Start a What-If Analysis
17 * ```typescript
18 * // init
19 * const createWhatIfAnalysis = yield* AWS.Forecast.CreateWhatIfAnalysis();
20 *
21 * // runtime
22 * const analysis = yield* createWhatIfAnalysis({
23 * WhatIfAnalysisName: "promo_scenarios",
24 * ForecastArn: forecastArn,
25 * });
26 * ```
27 *
28 * @binding
29 */
30export interface CreateWhatIfAnalysis extends Binding.Service<
31 CreateWhatIfAnalysis,
32 "AWS.Forecast.CreateWhatIfAnalysis",
33 () => Effect.Effect<
34 (
35 request: forecast.CreateWhatIfAnalysisRequest,
36 ) => Effect.Effect<
37 forecast.CreateWhatIfAnalysisResponse,
38 forecast.CreateWhatIfAnalysisError
39 >
40 >
41> {}
42export const CreateWhatIfAnalysis = Binding.Service<CreateWhatIfAnalysis>(
43 "AWS.Forecast.CreateWhatIfAnalysis",
44);