| 1 | import type * as opensearch from "@distilled.cloud/aws/opensearch"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `DescribeDomainHealth` operation (IAM action |
| 7 | * `es:DescribeDomainHealth`). |
| 8 | * |
| 9 | * Reads a domain's cluster health — overall status, master eligibility, per-AZ shard and node distribution — for dashboards and automated health checks. Provide the implementation with |
| 10 | * `Effect.provide(AWS.OpenSearch.DescribeDomainHealthHttp)`. |
| 11 | * ### Monitoring Domains |
| 12 | * **Example:** Check Cluster Health |
| 13 | * ```typescript |
| 14 | * const describeDomainHealth = yield* OpenSearch.DescribeDomainHealth(); |
| 15 | * |
| 16 | * const result = yield* describeDomainHealth({ DomainName: name }); |
| 17 | * // result.ClusterHealth → "Green" |
| 18 | * ``` |
| 19 | * |
| 20 | * @binding |
| 21 | */ |
| 22 | export interface DescribeDomainHealth extends Binding.Service< |
| 23 | DescribeDomainHealth, |
| 24 | "AWS.OpenSearch.DescribeDomainHealth", |
| 25 | () => Effect.Effect< |
| 26 | ( |
| 27 | request: opensearch.DescribeDomainHealthRequest, |
| 28 | ) => Effect.Effect< |
| 29 | opensearch.DescribeDomainHealthResponse, |
| 30 | opensearch.DescribeDomainHealthError |
| 31 | > |
| 32 | > |
| 33 | > {} |
| 34 | export const DescribeDomainHealth = Binding.Service<DescribeDomainHealth>( |
| 35 | "AWS.OpenSearch.DescribeDomainHealth", |
| 36 | ); |