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
| 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 ListServicesRequest extends Omit<ECS.ListServicesRequest, "cluster"> {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `ecs:ListServices`. |
| 10 | * |
| 11 | * Bind this operation to a `Cluster` inside a function runtime to get a |
| 12 | * callable that lists service ARNs in the bound cluster. The cluster ARN is |
| 13 | * injected automatically and the grant is conditioned on the bound cluster. |
| 14 | * ### Listing Services |
| 15 | * **Example:** List Fargate Services |
| 16 | * ```typescript |
| 17 | * const listServices = yield* AWS.ECS.ListServices(cluster); |
| 18 | * |
| 19 | * const response = yield* listServices({ launchType: "FARGATE" }); |
| 20 | * const serviceArns = response.serviceArns ?? []; |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface ListServices extends Binding.Service< |
| 26 | ListServices, |
| 27 | "AWS.ECS.ListServices", |
| 28 | ( |
| 29 | cluster: Cluster, |
| 30 | ) => Effect.Effect< |
| 31 | (request: ListServicesRequest) => Effect.Effect<ECS.ListServicesResponse, ECS.ListServicesError> |
| 32 | > |
| 33 | > {} |
| 34 | export const ListServices = Binding.Service<ListServices>("AWS.ECS.ListServices"); |