1import type * as route53 from "@distilled.cloud/aws/route-53";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import 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 */
30export interface GetHealthCheckStatus extends Binding.Service<
31 GetHealthCheckStatus,
32 "AWS.Route53.GetHealthCheckStatus",
33 (
34 healthCheck: HealthCheck,
35 ) => Effect.Effect<
36 () => Effect.Effect<
37 route53.GetHealthCheckStatusResponse,
38 route53.GetHealthCheckStatusError
39 >
40 >
41> {}
42export const GetHealthCheckStatus = Binding.Service<GetHealthCheckStatus>(
43 "AWS.Route53.GetHealthCheckStatus",
44);