sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Forecast/ CreateForecast.ts

import type * as forecast from "@distilled.cloud/aws/forecast";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for `forecast:CreateForecast` — generate a fresh forecast
 * from a trained predictor, the scheduled step that keeps the queryable
 * forecast current after each retraining or data import.
 *
 * Forecast ARNs are created at runtime, so the binding takes no arguments
 * and grants `forecast:CreateForecast` on `*`. Provide the implementation
 * with `Effect.provide(AWS.Forecast.CreateForecastHttp)`.
 *
 * ### Generating Forecasts
 * **Example:** Regenerate the Forecast
 * ```typescript
 * // init
 * const createForecast = yield* AWS.Forecast.CreateForecast();
 *
 * // runtime
 * const generated = yield* createForecast({
 *   ForecastName: "demand_2026_07_14",
 *   PredictorArn: predictorArn,
 * });
 * ```
 *
 * @binding
 */
export interface CreateForecast extends Binding.Service<
  CreateForecast,
  "AWS.Forecast.CreateForecast",
  () => Effect.Effect<
    (
      request: forecast.CreateForecastRequest,
    ) => Effect.Effect<forecast.CreateForecastResponse, forecast.CreateForecastError>
  >
> {}
export const CreateForecast = Binding.Service<CreateForecast>("AWS.Forecast.CreateForecast");