The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type * as redshift from "@distilled.cloud/aws/redshift"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 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<() => Effect.Effect<redshift.PauseClusterResult, redshift.PauseClusterError>> |
| 33 | > {} |
| 34 | export const PauseCluster = Binding.Service<PauseCluster>("AWS.Redshift.PauseCluster"); |