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:CreateWhatIfForecastExport` — export one or
7 * more scenario forecasts to S3 as CSV/Parquet so they can be compared
8 * offline or fed into downstream analytics.
9 *
10 * What-if forecast export ARNs are created at runtime, so the binding takes
11 * no arguments and grants `forecast:CreateWhatIfForecastExport` on `*`, plus
12 * `iam:PassRole` (conditioned to `forecast.amazonaws.com`) for the export
13 * destination role. Provide the implementation with
14 * `Effect.provide(AWS.Forecast.CreateWhatIfForecastExportHttp)`.
15 *
16 * ### Exporting Forecasts
17 * **Example:** Export Scenario Forecasts
18 * ```typescript
19 * // init
20 * const createWhatIfForecastExport =
21 * yield* AWS.Forecast.CreateWhatIfForecastExport();
22 *
23 * // runtime
24 * const job = yield* createWhatIfForecastExport({
25 * WhatIfForecastExportName: "promo_scenarios_export",
26 * WhatIfForecastArns: [scenarioArn],
27 * Destination: {
28 * S3Config: { Path: "s3://my-bucket/whatif/", RoleArn: exportRoleArn },
29 * },
30 * });
31 * ```
32 *
33 * @binding
34 */
35export interface CreateWhatIfForecastExport extends Binding.Service<
36 CreateWhatIfForecastExport,
37 "AWS.Forecast.CreateWhatIfForecastExport",
38 () => Effect.Effect<
39 (
40 request: forecast.CreateWhatIfForecastExportRequest,
41 ) => Effect.Effect<
42 forecast.CreateWhatIfForecastExportResponse,
43 forecast.CreateWhatIfForecastExportError
44 >
45 >
46> {}
47export const CreateWhatIfForecastExport =
48 Binding.Service<CreateWhatIfForecastExport>(
49 "AWS.Forecast.CreateWhatIfForecastExport",
50 );