| 1 | import type * as neptune from "@distilled.cloud/aws/neptune"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { DBCluster } from "./DBCluster.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for the `StopDBCluster` operation (IAM action |
| 8 | * `rds:StopDBCluster`). |
| 9 | * |
| 10 | * Stops the bound {@link DBCluster} (compute pauses, storage persists) — |
| 11 | * e.g. an ops function that parks a development cluster overnight to save |
| 12 | * cost. The cluster identifier is injected from the binding. Provide the |
| 13 | * implementation with `Effect.provide(AWS.Neptune.StopDBClusterHttp)`. |
| 14 | * ### Operating a Cluster |
| 15 | * **Example:** Stop a Running Cluster |
| 16 | * ```typescript |
| 17 | * // init — bind the operation to the cluster |
| 18 | * const stopDBCluster = yield* AWS.Neptune.StopDBCluster(cluster); |
| 19 | * |
| 20 | * // runtime |
| 21 | * yield* stopDBCluster(); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface StopDBCluster extends Binding.Service< |
| 27 | StopDBCluster, |
| 28 | "AWS.Neptune.StopDBCluster", |
| 29 | ( |
| 30 | cluster: DBCluster, |
| 31 | ) => Effect.Effect< |
| 32 | () => Effect.Effect<neptune.StopDBClusterResult, neptune.StopDBClusterError> |
| 33 | > |
| 34 | > {} |
| 35 | export const StopDBCluster = Binding.Service<StopDBCluster>( |
| 36 | "AWS.Neptune.StopDBCluster", |
| 37 | ); |