| 1 | import type * as route53 from "@distilled.cloud/aws/route-53"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { HealthCheck } from "./HealthCheck.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `GetHealthCheckLastFailureReason` operation (IAM |
| 8 | * action `route53:GetHealthCheckLastFailureReason` on the health check ARN). |
| 9 | * |
| 10 | * Reads the reason each Route 53 checker last reported the bound |
| 11 | * {@link HealthCheck} unhealthy — the diagnostic companion to |
| 12 | * {@link GetHealthCheckStatus} for alerting and incident tooling. Endpoint |
| 13 | * checks only (not `CALCULATED` / `RECOVERY_CONTROL`). Provide the |
| 14 | * implementation with |
| 15 | * `Effect.provide(AWS.Route53.GetHealthCheckLastFailureReasonHttp)`. |
| 16 | * ### Observing Health Checks |
| 17 | * **Example:** Read the last failure reasons |
| 18 | * ```typescript |
| 19 | * const getLastFailureReason = |
| 20 | * yield* AWS.Route53.GetHealthCheckLastFailureReason(check); |
| 21 | * |
| 22 | * const { HealthCheckObservations } = yield* getLastFailureReason(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface GetHealthCheckLastFailureReason extends Binding.Service< |
| 28 | GetHealthCheckLastFailureReason, |
| 29 | "AWS.Route53.GetHealthCheckLastFailureReason", |
| 30 | ( |
| 31 | healthCheck: HealthCheck, |
| 32 | ) => Effect.Effect< |
| 33 | () => Effect.Effect< |
| 34 | route53.GetHealthCheckLastFailureReasonResponse, |
| 35 | route53.GetHealthCheckLastFailureReasonError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const GetHealthCheckLastFailureReason = |
| 40 | Binding.Service<GetHealthCheckLastFailureReason>( |
| 41 | "AWS.Route53.GetHealthCheckLastFailureReason", |
| 42 | ); |