@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, 04:45 UTC

main
ts 41 lines 1.48 KB
Raw
1 import type * as route53 from "@distilled.cloud/aws/route-53";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { HealthCheck } from "./HealthCheck.ts";
5
6 /**
7 * Runtime binding for the `GetHealthCheckStatus` operation (IAM action
8 * `route53:GetHealthCheckStatus` on the health check ARN).
9 *
10 * Reads the bound {@link HealthCheck}'s current status as reported by each
11 * Route 53 checker — drive dashboards or failover decisions from the same
12 * signal Route 53 routes on. Endpoint checks only (not `CALCULATED` /
13 * `RECOVERY_CONTROL`). Provide the implementation with
14 * `Effect.provide(AWS.Route53.GetHealthCheckStatusHttp)`.
15 * ### Observing Health Checks
16 * **Example:** Read checker observations
17 * ```typescript
18 * const getHealthCheckStatus = yield* AWS.Route53.GetHealthCheckStatus(check);
19 *
20 * const { HealthCheckObservations } = yield* getHealthCheckStatus();
21 * for (const observation of HealthCheckObservations) {
22 * yield* Effect.log(
23 * `${observation.Region}: ${observation.StatusReport?.Status}`,
24 * );
25 * }
26 * ```
27 *
28 * @binding
29 */
30 export interface GetHealthCheckStatus extends Binding.Service<
31 GetHealthCheckStatus,
32 "AWS.Route53.GetHealthCheckStatus",
33 (
34 healthCheck: HealthCheck,
35 ) => Effect.Effect<
36 () => Effect.Effect<route53.GetHealthCheckStatusResponse, route53.GetHealthCheckStatusError>
37 >
38 > {}
39 export const GetHealthCheckStatus = Binding.Service<GetHealthCheckStatus>(
40 "AWS.Route53.GetHealthCheckStatus",
41 );