@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 43 lines 1.48 KB
Raw
1 import type * as neptune from "@distilled.cloud/aws/neptune";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import 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 */
30 export interface CreateDBClusterSnapshot extends Binding.Service<
31 CreateDBClusterSnapshot,
32 "AWS.Neptune.CreateDBClusterSnapshot",
33 (
34 cluster: DBCluster,
35 ) => Effect.Effect<
36 (
37 request?: Omit<neptune.CreateDBClusterSnapshotMessage, "DBClusterIdentifier">,
38 ) => Effect.Effect<neptune.CreateDBClusterSnapshotResult, neptune.CreateDBClusterSnapshotError>
39 >
40 > {}
41 export const CreateDBClusterSnapshot = Binding.Service<CreateDBClusterSnapshot>(
42 "AWS.Neptune.CreateDBClusterSnapshot",
43 );