| 1 | import type * as forecast from "@distilled.cloud/aws/forecast"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `forecast:DescribeWhatIfAnalysis` — poll the status of |
| 7 | * a what-if analysis created with {@link CreateWhatIfAnalysis} until it is |
| 8 | * `ACTIVE` and scenario forecasts can be created under it. |
| 9 | * |
| 10 | * What-if analysis ARNs are created at runtime, so the binding takes no |
| 11 | * arguments and grants `forecast:DescribeWhatIfAnalysis` on `*`. Provide the |
| 12 | * implementation with |
| 13 | * `Effect.provide(AWS.Forecast.DescribeWhatIfAnalysisHttp)`. |
| 14 | * |
| 15 | * ### What-If Scenarios |
| 16 | * **Example:** Poll a What-If Analysis |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const describeWhatIfAnalysis = yield* AWS.Forecast.DescribeWhatIfAnalysis(); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { Status } = yield* describeWhatIfAnalysis({ |
| 23 | * WhatIfAnalysisArn: analysisArn, |
| 24 | * }); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface DescribeWhatIfAnalysis extends Binding.Service< |
| 30 | DescribeWhatIfAnalysis, |
| 31 | "AWS.Forecast.DescribeWhatIfAnalysis", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request: forecast.DescribeWhatIfAnalysisRequest, |
| 35 | ) => Effect.Effect< |
| 36 | forecast.DescribeWhatIfAnalysisResponse, |
| 37 | forecast.DescribeWhatIfAnalysisError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const DescribeWhatIfAnalysis = Binding.Service<DescribeWhatIfAnalysis>( |
| 42 | "AWS.Forecast.DescribeWhatIfAnalysis", |
| 43 | ); |