| 1 | import type * as dax from "@distilled.cloud/aws/dax"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `DescribeClusters` operation (IAM action |
| 7 | * `dax:DescribeClusters`). |
| 8 | * |
| 9 | * Lists the account's DAX clusters (optionally filtered by name) with node |
| 10 | * status, endpoints and configuration embedded — the building block of |
| 11 | * cluster-health monitoring and node-reboot automation. Provide the |
| 12 | * implementation with `Effect.provide(AWS.DAX.DescribeClustersHttp)`. |
| 13 | * ### Monitoring Clusters |
| 14 | * **Example:** Check a Cluster's Node Health |
| 15 | * ```typescript |
| 16 | * const describeClusters = yield* DAX.DescribeClusters(); |
| 17 | * |
| 18 | * const page = yield* describeClusters({ ClusterNames: [clusterName] }); |
| 19 | * const available = page.Clusters?.[0]?.Nodes?.filter( |
| 20 | * (node) => node.NodeStatus === "available", |
| 21 | * ); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface DescribeClusters extends Binding.Service< |
| 27 | DescribeClusters, |
| 28 | "AWS.DAX.DescribeClusters", |
| 29 | () => Effect.Effect< |
| 30 | ( |
| 31 | request?: dax.DescribeClustersRequest, |
| 32 | ) => Effect.Effect<dax.DescribeClustersResponse, dax.DescribeClustersError> |
| 33 | > |
| 34 | > {} |
| 35 | export const DescribeClusters = Binding.Service<DescribeClusters>( |
| 36 | "AWS.DAX.DescribeClusters", |
| 37 | ); |