| 1 | import type * as redshift from "@distilled.cloud/aws/redshift"; |
| 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 | * `redshift:DescribeClusters`). |
| 8 | * |
| 9 | * Lists the account's provisioned Redshift clusters or looks one up by |
| 10 | * identifier — e.g. an ops function that checks whether the warehouse is |
| 11 | * `available` before submitting a load. Provide the implementation with |
| 12 | * `Effect.provide(AWS.Redshift.DescribeClustersHttp)`. |
| 13 | * ### Monitoring Clusters |
| 14 | * **Example:** Check a Cluster's Status |
| 15 | * ```typescript |
| 16 | * const describeClusters = yield* AWS.Redshift.DescribeClusters(); |
| 17 | * |
| 18 | * const page = yield* describeClusters({ ClusterIdentifier: clusterId }); |
| 19 | * const status = page.Clusters?.[0]?.ClusterStatus; |
| 20 | * ``` |
| 21 | * |
| 22 | * @binding |
| 23 | */ |
| 24 | export interface DescribeClusters extends Binding.Service< |
| 25 | DescribeClusters, |
| 26 | "AWS.Redshift.DescribeClusters", |
| 27 | () => Effect.Effect< |
| 28 | ( |
| 29 | request?: redshift.DescribeClustersMessage, |
| 30 | ) => Effect.Effect<redshift.ClustersMessage, redshift.DescribeClustersError> |
| 31 | > |
| 32 | > {} |
| 33 | export const DescribeClusters = Binding.Service<DescribeClusters>( |
| 34 | "AWS.Redshift.DescribeClusters", |
| 35 | ); |