| 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:DescribeAutoPredictor` — poll a training run |
| 7 | * started by {@link CreateAutoPredictor} until its `Status` reaches `ACTIVE` |
| 8 | * (or `CREATE_FAILED`) and read its estimated time remaining. |
| 9 | * |
| 10 | * Predictor ARNs are created at runtime, so the binding takes no arguments |
| 11 | * and grants `forecast:DescribeAutoPredictor` on `*`. Provide the |
| 12 | * implementation with `Effect.provide(AWS.Forecast.DescribeAutoPredictorHttp)`. |
| 13 | * |
| 14 | * ### Training Predictors |
| 15 | * **Example:** Poll a Training Run |
| 16 | * ```typescript |
| 17 | * // init |
| 18 | * const describeAutoPredictor = yield* AWS.Forecast.DescribeAutoPredictor(); |
| 19 | * |
| 20 | * // runtime |
| 21 | * const detail = yield* describeAutoPredictor({ |
| 22 | * PredictorArn: predictor.PredictorArn!, |
| 23 | * }); |
| 24 | * yield* Effect.log(`training ${detail.Status}`); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface DescribeAutoPredictor extends Binding.Service< |
| 30 | DescribeAutoPredictor, |
| 31 | "AWS.Forecast.DescribeAutoPredictor", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request: forecast.DescribeAutoPredictorRequest, |
| 35 | ) => Effect.Effect< |
| 36 | forecast.DescribeAutoPredictorResponse, |
| 37 | forecast.DescribeAutoPredictorError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const DescribeAutoPredictor = Binding.Service<DescribeAutoPredictor>( |
| 42 | "AWS.Forecast.DescribeAutoPredictor", |
| 43 | ); |