| 1 | import type * as fsx from "@distilled.cloud/aws/fsx"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `CancelDataRepositoryTask` operation (IAM action |
| 7 | * `fsx:CancelDataRepositoryTask` on `*` — runtime-created tasks have ARNs |
| 8 | * unknowable at deploy time). |
| 9 | * |
| 10 | * Cancels a `PENDING` or `EXECUTING` Lustre data repository task started |
| 11 | * with {@link CreateDataRepositoryTask}. A task that already finished |
| 12 | * surfaces the typed `DataRepositoryTaskEnded`. Provide the implementation |
| 13 | * with `Effect.provide(AWS.FSx.CancelDataRepositoryTaskHttp)`. |
| 14 | * ### Data Repository Tasks |
| 15 | * **Example:** Cancel a runaway export |
| 16 | * ```typescript |
| 17 | * const cancelDataRepositoryTask = |
| 18 | * yield* AWS.FSx.CancelDataRepositoryTask(); |
| 19 | * |
| 20 | * yield* cancelDataRepositoryTask({ TaskId: taskId }).pipe( |
| 21 | * Effect.catchTag("DataRepositoryTaskEnded", () => Effect.void), |
| 22 | * ); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface CancelDataRepositoryTask extends Binding.Service< |
| 28 | CancelDataRepositoryTask, |
| 29 | "AWS.FSx.CancelDataRepositoryTask", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request: fsx.CancelDataRepositoryTaskRequest, |
| 33 | ) => Effect.Effect< |
| 34 | fsx.CancelDataRepositoryTaskResponse, |
| 35 | fsx.CancelDataRepositoryTaskError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const CancelDataRepositoryTask = |
| 40 | Binding.Service<CancelDataRepositoryTask>("AWS.FSx.CancelDataRepositoryTask"); |