@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 36 lines 1.26 KB
Raw
1 import type * as memorydb from "@distilled.cloud/aws/memorydb";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Cluster } from "./Cluster.ts";
5
6 /**
7 * Runtime binding for the `CreateSnapshot` operation (IAM actions
8 * `memorydb:CreateSnapshot` + `memorydb:TagResource`), scoped to one
9 * {@link Cluster}.
10 *
11 * Takes an on-demand snapshot of the bound cluster — e.g. a pre-migration
12 * backup from an operational Lambda. Provide the implementation with
13 * `Effect.provide(AWS.MemoryDB.CreateSnapshotHttp)`.
14 * ### Managing Snapshots
15 * **Example:** Take an On-Demand Snapshot
16 * ```typescript
17 * const createSnapshot = yield* MemoryDB.CreateSnapshot(cluster);
18 *
19 * const result = yield* createSnapshot({ SnapshotName: "pre-migration" });
20 * // result.Snapshot.Status → "creating"
21 * ```
22 *
23 * @binding
24 */
25 export interface CreateSnapshot extends Binding.Service<
26 CreateSnapshot,
27 "AWS.MemoryDB.CreateSnapshot",
28 (
29 cluster: Cluster,
30 ) => Effect.Effect<
31 (
32 request: Omit<memorydb.CreateSnapshotRequest, "ClusterName">,
33 ) => Effect.Effect<memorydb.CreateSnapshotResponse, memorydb.CreateSnapshotError>
34 >
35 > {}
36 export const CreateSnapshot = Binding.Service<CreateSnapshot>("AWS.MemoryDB.CreateSnapshot");