| 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 `DescribeDataRepositoryTasks` operation (IAM |
| 7 | * action `fsx:DescribeDataRepositoryTasks` on `*`). |
| 8 | * |
| 9 | * Lists Lustre data repository tasks — optionally filtered by |
| 10 | * `file-system-id` or `task-lifecycle`, or by explicit `TaskIds` — from |
| 11 | * inside a function runtime. Pairs with {@link CreateDataRepositoryTask} to |
| 12 | * poll an export/import task until it reaches `SUCCEEDED`. Provide the |
| 13 | * implementation with |
| 14 | * `Effect.provide(AWS.FSx.DescribeDataRepositoryTasksHttp)`. |
| 15 | * ### Data Repository Tasks |
| 16 | * **Example:** Poll a task until it finishes |
| 17 | * ```typescript |
| 18 | * const describeDataRepositoryTasks = |
| 19 | * yield* AWS.FSx.DescribeDataRepositoryTasks(); |
| 20 | * |
| 21 | * const response = yield* describeDataRepositoryTasks({ |
| 22 | * TaskIds: [taskId], |
| 23 | * }); |
| 24 | * yield* Effect.log(response.DataRepositoryTasks?.[0]?.Lifecycle); |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface DescribeDataRepositoryTasks extends Binding.Service< |
| 30 | DescribeDataRepositoryTasks, |
| 31 | "AWS.FSx.DescribeDataRepositoryTasks", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request?: fsx.DescribeDataRepositoryTasksRequest, |
| 35 | ) => Effect.Effect< |
| 36 | fsx.DescribeDataRepositoryTasksResponse, |
| 37 | fsx.DescribeDataRepositoryTasksError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const DescribeDataRepositoryTasks = |
| 42 | Binding.Service<DescribeDataRepositoryTasks>( |
| 43 | "AWS.FSx.DescribeDataRepositoryTasks", |
| 44 | ); |