| 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:StopResource` — halt an in-progress Forecast |
| 7 | * job (dataset import, predictor training, forecast generation, or any of |
| 8 | * their export jobs), the cost-control lever for a runaway training run. A |
| 9 | * stopped job cannot be resumed. |
| 10 | * |
| 11 | * Job ARNs are created at runtime, so the binding takes no arguments and |
| 12 | * grants `forecast:StopResource` on `*`. Provide the implementation with |
| 13 | * `Effect.provide(AWS.Forecast.StopResourceHttp)`. |
| 14 | * |
| 15 | * ### Managing Jobs |
| 16 | * **Example:** Halt a Runaway Training Run |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const stopResource = yield* AWS.Forecast.StopResource(); |
| 20 | * |
| 21 | * // runtime |
| 22 | * yield* stopResource({ ResourceArn: predictorArn }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface StopResource extends Binding.Service< |
| 28 | StopResource, |
| 29 | "AWS.Forecast.StopResource", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request: forecast.StopResourceRequest, |
| 33 | ) => Effect.Effect< |
| 34 | forecast.StopResourceResponse, |
| 35 | forecast.StopResourceError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const StopResource = Binding.Service<StopResource>( |
| 40 | "AWS.Forecast.StopResource", |
| 41 | ); |