@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 42 lines 1.43 KB
Raw
1 import type * as datasync from "@distilled.cloud/aws/datasync";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Task } from "./Task.ts";
5
6 /**
7 * Runtime binding for `datasync:ListTaskExecutions`.
8 *
9 * Enumerates the bound {@link Task}'s executions (most recent first) so an
10 * ops function can audit run history or find the latest run's ARN. The task
11 * ARN is injected from the binding; pass `MaxResults`/`NextToken` to page.
12 * Provide the implementation with
13 * `Effect.provide(AWS.DataSync.ListTaskExecutionsHttp)`.
14 * ### Monitoring Tasks
15 * **Example:** List The Task's Runs
16 * ```typescript
17 * // init — bind the operation to the task
18 * const listTaskExecutions = yield* AWS.DataSync.ListTaskExecutions(task);
19 *
20 * // runtime
21 * const { TaskExecutions } = yield* listTaskExecutions();
22 * for (const execution of TaskExecutions ?? []) {
23 * yield* Effect.log(`${execution.TaskExecutionArn}: ${execution.Status}`);
24 * }
25 * ```
26 *
27 * @binding
28 */
29 export interface ListTaskExecutions extends Binding.Service<
30 ListTaskExecutions,
31 "AWS.DataSync.ListTaskExecutions",
32 (
33 task: Task,
34 ) => Effect.Effect<
35 (
36 request?: Omit<datasync.ListTaskExecutionsRequest, "TaskArn">,
37 ) => Effect.Effect<datasync.ListTaskExecutionsResponse, datasync.ListTaskExecutionsError>
38 >
39 > {}
40 export const ListTaskExecutions = Binding.Service<ListTaskExecutions>(
41 "AWS.DataSync.ListTaskExecutions",
42 );