1import type * as rds from "@distilled.cloud/aws/rds";
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 `CreateDBClusterSnapshot` operation (IAM actions
8 * `rds:CreateDBClusterSnapshot` +
9 * `rds:AddTagsToResource`).
10 *
11 * Takes a manual snapshot of the bound {@link DBCluster} — e.g. a
12 * pre-migration backup function or a scheduled snapshot-rotation job. The
13 * cluster identifier is injected from the binding. Provide the implementation with
14 * `Effect.provide(AWS.RDS.CreateDBClusterSnapshotHttp)`.
15 * ### Managing Cluster Snapshots
16 * **Example:** Take a Manual Cluster Snapshot
17 * ```typescript
18 * // init — bind the operation to the cluster
19 * const createDBClusterSnapshot =
20 * yield* AWS.RDS.CreateDBClusterSnapshot(cluster);
21 *
22 * // runtime
23 * yield* createDBClusterSnapshot({
24 * DBClusterSnapshotIdentifier: `pre-migration-${runId}`,
25 * });
26 * ```
27 *
28 * @binding
29 */
30export interface CreateDBClusterSnapshot extends Binding.Service<
31 CreateDBClusterSnapshot,
32 "AWS.RDS.CreateDBClusterSnapshot",
33 (
34 cluster: DBCluster,
35 ) => Effect.Effect<
36 (
37 request: Omit<rds.CreateDBClusterSnapshotMessage, "DBClusterIdentifier">,
38 ) => Effect.Effect<
39 rds.CreateDBClusterSnapshotResult,
40 rds.CreateDBClusterSnapshotError
41 >
42 >
43> {}
44export const CreateDBClusterSnapshot = Binding.Service<CreateDBClusterSnapshot>(
45 "AWS.RDS.CreateDBClusterSnapshot",
46);