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

main
ts 36 lines 1.11 KB
Raw
1 import type * as ECS from "@distilled.cloud/aws/ecs";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Cluster } from "./Cluster.ts";
5
6 export interface ListTasksRequest extends Omit<ECS.ListTasksRequest, "cluster"> {}
7
8 /**
9 * Runtime binding for `ecs:ListTasks`.
10 *
11 * Bind this operation to a `Cluster` inside a function runtime to get a
12 * callable that lists task ARNs in the bound cluster. The cluster ARN is
13 * injected automatically and the grant is conditioned on the bound cluster.
14 * ### Listing Tasks
15 * **Example:** List Stopped Tasks
16 * ```typescript
17 * const listTasks = yield* AWS.ECS.ListTasks(cluster);
18 *
19 * const response = yield* listTasks({
20 * desiredStatus: "STOPPED",
21 * });
22 * const taskArns = response.taskArns ?? [];
23 * ```
24 *
25 * @binding
26 */
27 export interface ListTasks extends Binding.Service<
28 ListTasks,
29 "AWS.ECS.ListTasks",
30 (
31 cluster: Cluster,
32 ) => Effect.Effect<
33 (request: ListTasksRequest) => Effect.Effect<ECS.ListTasksResponse, ECS.ListTasksError>
34 >
35 > {}
36 export const ListTasks = Binding.Service<ListTasks>("AWS.ECS.ListTasks");