| 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:DescribeWhatIfForecastExport` — poll the |
| 7 | * status of a scenario-forecast export started with |
| 8 | * {@link CreateWhatIfForecastExport} until the files land in S3. |
| 9 | * |
| 10 | * Export ARNs are created at runtime, so the binding takes no arguments and |
| 11 | * grants `forecast:DescribeWhatIfForecastExport` on `*`. Provide the |
| 12 | * implementation with |
| 13 | * `Effect.provide(AWS.Forecast.DescribeWhatIfForecastExportHttp)`. |
| 14 | * |
| 15 | * ### Exporting Forecasts |
| 16 | * **Example:** Poll a Scenario Export |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const describeWhatIfForecastExport = |
| 20 | * yield* AWS.Forecast.DescribeWhatIfForecastExport(); |
| 21 | * |
| 22 | * // runtime |
| 23 | * const { Status } = yield* describeWhatIfForecastExport({ |
| 24 | * WhatIfForecastExportArn: exportArn, |
| 25 | * }); |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface DescribeWhatIfForecastExport extends Binding.Service< |
| 31 | DescribeWhatIfForecastExport, |
| 32 | "AWS.Forecast.DescribeWhatIfForecastExport", |
| 33 | () => Effect.Effect< |
| 34 | ( |
| 35 | request: forecast.DescribeWhatIfForecastExportRequest, |
| 36 | ) => Effect.Effect< |
| 37 | forecast.DescribeWhatIfForecastExportResponse, |
| 38 | forecast.DescribeWhatIfForecastExportError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | export const DescribeWhatIfForecastExport = |
| 43 | Binding.Service<DescribeWhatIfForecastExport>( |
| 44 | "AWS.Forecast.DescribeWhatIfForecastExport", |
| 45 | ); |