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

main
ts 54 lines 1.79 KB
Raw
1 import type * as SD from "@distilled.cloud/aws/servicediscovery";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Service } from "./Service.ts";
5
6 /**
7 * `GetInstancesHealthStatus` request with `ServiceId` injected from the
8 * bound {@link Service}.
9 */
10 export interface GetInstancesHealthStatusRequest extends Omit<
11 SD.GetInstancesHealthStatusRequest,
12 "ServiceId"
13 > {}
14
15 /**
16 * Runtime binding for `servicediscovery:GetInstancesHealthStatus` — reads
17 * the current health status (`HEALTHY`, `UNHEALTHY`, or `UNKNOWN`) of the
18 * bound {@link Service}'s instances. There is a brief delay between
19 * registering an instance and its health status becoming available.
20 * Provide the implementation with
21 * `Effect.provide(AWS.CloudMap.GetInstancesHealthStatusHttp)`.
22 * ### Instance Health
23 * **Example:** Read Health of All Instances
24 * ```typescript
25 * const getInstancesHealthStatus =
26 * yield* AWS.CloudMap.GetInstancesHealthStatus(service);
27 *
28 * const { Status } = yield* getInstancesHealthStatus();
29 * console.log(Status?.["worker-1"]); // "HEALTHY" | "UNHEALTHY" | "UNKNOWN"
30 * ```
31 *
32 * **Example:** Read Health of Specific Instances
33 * ```typescript
34 * const { Status } = yield* getInstancesHealthStatus({
35 * Instances: ["worker-1", "worker-2"],
36 * });
37 * ```
38 *
39 * @binding
40 */
41 export interface GetInstancesHealthStatus extends Binding.Service<
42 GetInstancesHealthStatus,
43 "AWS.CloudMap.GetInstancesHealthStatus",
44 <S extends Service>(
45 service: S,
46 ) => Effect.Effect<
47 (
48 request?: GetInstancesHealthStatusRequest,
49 ) => Effect.Effect<SD.GetInstancesHealthStatusResponse, SD.GetInstancesHealthStatusError>
50 >
51 > {}
52 export const GetInstancesHealthStatus = Binding.Service<GetInstancesHealthStatus>(
53 "AWS.CloudMap.GetInstancesHealthStatus",
54 );