| 1 | import type * as TSW from "@distilled.cloud/aws/timestream-write"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | export interface DescribeBatchLoadTaskRequest |
| 6 | extends TSW.DescribeBatchLoadTaskRequest {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `timestream-write:DescribeBatchLoadTask` — poll a bulk |
| 10 | * import started by {@link CreateBatchLoadTask} for its status and progress |
| 11 | * report. |
| 12 | * |
| 13 | * Batch-load task reads are keyed by `TaskId` and authorized account-wide, so |
| 14 | * this is an account-level binding invoked with no resource argument. |
| 15 | * |
| 16 | * Provide `Timestream.DescribeBatchLoadTaskHttp` on the Function to implement |
| 17 | * the binding. |
| 18 | * |
| 19 | * ### Batch Loading |
| 20 | * **Example:** Poll an import until it finishes |
| 21 | * ```typescript |
| 22 | * // init — account-level binding, no resource argument |
| 23 | * const describeBatchLoadTask = yield* Timestream.DescribeBatchLoadTask(); |
| 24 | * |
| 25 | * // runtime |
| 26 | * const described = yield* describeBatchLoadTask({ TaskId: task.TaskId }); |
| 27 | * // described.BatchLoadTaskDescription?.TaskStatus === "SUCCEEDED" |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface DescribeBatchLoadTask extends Binding.Service< |
| 33 | DescribeBatchLoadTask, |
| 34 | "AWS.Timestream.DescribeBatchLoadTask", |
| 35 | () => Effect.Effect< |
| 36 | ( |
| 37 | request: DescribeBatchLoadTaskRequest, |
| 38 | ) => Effect.Effect< |
| 39 | TSW.DescribeBatchLoadTaskResponse, |
| 40 | TSW.DescribeBatchLoadTaskError | TSW.DescribeEndpointsError |
| 41 | > |
| 42 | > |
| 43 | > {} |
| 44 | |
| 45 | export const DescribeBatchLoadTask = Binding.Service<DescribeBatchLoadTask>( |
| 46 | "AWS.Timestream.DescribeBatchLoadTask", |
| 47 | ); |