| 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 | import type { Cluster } from "./Cluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `PauseCluster` operation (IAM action |
| 8 | * `redshift:PauseCluster`). |
| 9 | * |
| 10 | * Pauses the bound {@link Cluster} (compute billing stops, storage |
| 11 | * persists) — e.g. a scheduled ops function that parks the warehouse |
| 12 | * overnight to save cost. The cluster identifier is injected from the |
| 13 | * binding. Provide the implementation with |
| 14 | * `Effect.provide(AWS.Redshift.PauseClusterHttp)`. |
| 15 | * ### Operating a Cluster |
| 16 | * **Example:** Pause the Warehouse Overnight |
| 17 | * ```typescript |
| 18 | * // init — bind the operation to the cluster |
| 19 | * const pauseCluster = yield* AWS.Redshift.PauseCluster(cluster); |
| 20 | * |
| 21 | * // runtime |
| 22 | * yield* pauseCluster(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface PauseCluster extends Binding.Service< |
| 28 | PauseCluster, |
| 29 | "AWS.Redshift.PauseCluster", |
| 30 | ( |
| 31 | cluster: Cluster, |
| 32 | ) => Effect.Effect< |
| 33 | () => Effect.Effect<redshift.PauseClusterResult, redshift.PauseClusterError> |
| 34 | > |
| 35 | > {} |
| 36 | export const PauseCluster = Binding.Service<PauseCluster>( |
| 37 | "AWS.Redshift.PauseCluster", |
| 38 | ); |