@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 44 lines 1.54 KB
Raw
1 import type * as forecast from "@distilled.cloud/aws/forecast";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `forecast:CreateAutoPredictor` — kick off (re)training
7 * of an AutoPredictor from a dataset group, the scheduled-retraining step of
8 * a grandfathered Forecast deployment. Also grants `iam:PassRole`
9 * (conditioned to `forecast.amazonaws.com`) for the KMS-encryption role an
10 * `EncryptionConfig` passes to the service.
11 *
12 * Predictor ARNs are created at runtime, so the binding takes no arguments
13 * and grants `forecast:CreateAutoPredictor` on `*`. Provide the
14 * implementation with `Effect.provide(AWS.Forecast.CreateAutoPredictorHttp)`.
15 *
16 * ### Training Predictors
17 * **Example:** Retrain a Predictor
18 * ```typescript
19 * // init
20 * const createAutoPredictor = yield* AWS.Forecast.CreateAutoPredictor();
21 *
22 * // runtime
23 * const predictor = yield* createAutoPredictor({
24 * PredictorName: "demand_2026_07",
25 * ForecastHorizon: 14,
26 * ForecastFrequency: "D",
27 * DataConfig: { DatasetGroupArn: group.datasetGroupArn },
28 * });
29 * ```
30 *
31 * @binding
32 */
33 export interface CreateAutoPredictor extends Binding.Service<
34 CreateAutoPredictor,
35 "AWS.Forecast.CreateAutoPredictor",
36 () => Effect.Effect<
37 (
38 request: forecast.CreateAutoPredictorRequest,
39 ) => Effect.Effect<forecast.CreateAutoPredictorResponse, forecast.CreateAutoPredictorError>
40 >
41 > {}
42 export const CreateAutoPredictor = Binding.Service<CreateAutoPredictor>(
43 "AWS.Forecast.CreateAutoPredictor",
44 );