@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, 06:00 UTC

main
ts 43 lines 1.42 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 ListContainerInstancesRequest extends Omit<
7 ECS.ListContainerInstancesRequest,
8 "cluster"
9 > {}
10
11 /**
12 * Runtime binding for `ecs:ListContainerInstances`.
13 *
14 * Bind this operation to a `Cluster` inside a function runtime to get a
15 * callable that lists container-instance ARNs registered to the bound
16 * cluster (EC2/EXTERNAL launch types). The cluster ARN is injected
17 * automatically and the host is granted `ecs:ListContainerInstances` on the
18 * cluster.
19 * ### Container Instances
20 * **Example:** List ACTIVE Container Instances
21 * ```typescript
22 * const listContainerInstances = yield* AWS.ECS.ListContainerInstances(cluster);
23 *
24 * const response = yield* listContainerInstances({ status: "ACTIVE" });
25 * const instanceArns = response.containerInstanceArns ?? [];
26 * ```
27 *
28 * @binding
29 */
30 export interface ListContainerInstances extends Binding.Service<
31 ListContainerInstances,
32 "AWS.ECS.ListContainerInstances",
33 (
34 cluster: Cluster,
35 ) => Effect.Effect<
36 (
37 request: ListContainerInstancesRequest,
38 ) => Effect.Effect<ECS.ListContainerInstancesResponse, ECS.ListContainerInstancesError>
39 >
40 > {}
41 export const ListContainerInstances = Binding.Service<ListContainerInstances>(
42 "AWS.ECS.ListContainerInstances",
43 );