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