1import type * as docdb from "@distilled.cloud/aws/docdb";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import 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 billing pauses while storage
11 * is retained (up to 7 days, after which DocumentDB starts it back up) —
12 * e.g. an ops function that parks a development cluster overnight. The
13 * cluster identifier is injected from the binding. Provide the
14 * implementation with `Effect.provide(AWS.DocDB.StopDBClusterHttp)`.
15 * ### Operating a Cluster
16 * **Example:** Stop a Running Cluster
17 * ```typescript
18 * // init — bind the operation to the cluster
19 * const stopDBCluster = yield* AWS.DocDB.StopDBCluster(cluster);
20 *
21 * // runtime
22 * yield* stopDBCluster();
23 * ```
24 *
25 * @binding
26 */
27export interface StopDBCluster extends Binding.Service<
28 StopDBCluster,
29 "AWS.DocDB.StopDBCluster",
30 (
31 cluster: DBCluster,
32 ) => Effect.Effect<
33 () => Effect.Effect<docdb.StopDBClusterResult, docdb.StopDBClusterError>
34 >
35> {}
36export const StopDBCluster = Binding.Service<StopDBCluster>(
37 "AWS.DocDB.StopDBCluster",
38);