1import type * as docdbelastic from "@distilled.cloud/aws/docdb-elastic";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Cluster } from "./Cluster.ts";
5
6/**
7 * Runtime binding for the `StopCluster` operation (IAM action
8 * `docdb-elastic:StopCluster`), scoped to one {@link Cluster}.
9 *
10 * Stops the bound elastic cluster — compute billing pauses (storage is still
11 * billed) and the cluster transitions through `STOPPING` to `STOPPED`. Use
12 * from a scheduled Lambda to park non-production clusters outside working
13 * hours. Provide the implementation with
14 * `Effect.provide(AWS.DocDBElastic.StopClusterHttp)`.
15 * ### Starting and Stopping a Cluster
16 * **Example:** Stop a Running Cluster
17 * ```typescript
18 * const stopCluster = yield* DocDBElastic.StopCluster(cluster);
19 *
20 * const result = yield* stopCluster();
21 * // result.cluster.status → "STOPPING"
22 * ```
23 *
24 * @binding
25 */
26export interface StopCluster extends Binding.Service<
27 StopCluster,
28 "AWS.DocDBElastic.StopCluster",
29 (
30 cluster: Cluster,
31 ) => Effect.Effect<
32 () => Effect.Effect<
33 docdbelastic.StopClusterOutput,
34 docdbelastic.StopClusterError
35 >
36 >
37> {}
38export const StopCluster = Binding.Service<StopCluster>(
39 "AWS.DocDBElastic.StopCluster",
40);