| 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:CreateForecast` — generate a fresh forecast |
| 7 | * from a trained predictor, the scheduled step that keeps the queryable |
| 8 | * forecast current after each retraining or data import. |
| 9 | * |
| 10 | * Forecast ARNs are created at runtime, so the binding takes no arguments |
| 11 | * and grants `forecast:CreateForecast` on `*`. Provide the implementation |
| 12 | * with `Effect.provide(AWS.Forecast.CreateForecastHttp)`. |
| 13 | * |
| 14 | * ### Generating Forecasts |
| 15 | * **Example:** Regenerate the Forecast |
| 16 | * ```typescript |
| 17 | * // init |
| 18 | * const createForecast = yield* AWS.Forecast.CreateForecast(); |
| 19 | * |
| 20 | * // runtime |
| 21 | * const generated = yield* createForecast({ |
| 22 | * ForecastName: "demand_2026_07_14", |
| 23 | * PredictorArn: predictorArn, |
| 24 | * }); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface CreateForecast extends Binding.Service< |
| 30 | CreateForecast, |
| 31 | "AWS.Forecast.CreateForecast", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request: forecast.CreateForecastRequest, |
| 35 | ) => Effect.Effect< |
| 36 | forecast.CreateForecastResponse, |
| 37 | forecast.CreateForecastError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const CreateForecast = Binding.Service<CreateForecast>( |
| 42 | "AWS.Forecast.CreateForecast", |
| 43 | ); |