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

main
ts 37 lines 1.28 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 DescribeServicesRequest extends Omit<ECS.DescribeServicesRequest, "cluster"> {}
7
8 /**
9 * Runtime binding for `ecs:DescribeServices`.
10 *
11 * Bind this operation to a `Cluster` inside a function runtime to get a
12 * callable that describes services in the bound cluster. The cluster ARN is
13 * injected automatically and the host is granted `ecs:DescribeServices` on
14 * the cluster's services.
15 * ### Describing Services
16 * **Example:** Check a Service's Deployment Status
17 * ```typescript
18 * const describeServices = yield* AWS.ECS.DescribeServices(cluster);
19 *
20 * const response = yield* describeServices({ services: [serviceName] });
21 * const runningCount = response.services?.[0]?.runningCount;
22 * ```
23 *
24 * @binding
25 */
26 export interface DescribeServices extends Binding.Service<
27 DescribeServices,
28 "AWS.ECS.DescribeServices",
29 (
30 cluster: Cluster,
31 ) => Effect.Effect<
32 (
33 request: DescribeServicesRequest,
34 ) => Effect.Effect<ECS.DescribeServicesResponse, ECS.DescribeServicesError>
35 >
36 > {}
37 export const DescribeServices = Binding.Service<DescribeServices>("AWS.ECS.DescribeServices");