@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 44 lines 1.47 KB
Raw
1 import type * as redshift from "@distilled.cloud/aws/redshift";
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 `CreateClusterSnapshot` operation (IAM action
8 * `redshift:CreateClusterSnapshot` on the cluster and its
9 * `snapshot:{cluster}/*` ARNs).
10 *
11 * Takes a manual snapshot of the bound {@link Cluster} — 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
14 * implementation with
15 * `Effect.provide(AWS.Redshift.CreateClusterSnapshotHttp)`.
16 * ### Managing Snapshots
17 * **Example:** Take a Manual Snapshot
18 * ```typescript
19 * // init — bind the operation to the cluster
20 * const createClusterSnapshot =
21 * yield* AWS.Redshift.CreateClusterSnapshot(cluster);
22 *
23 * // runtime
24 * yield* createClusterSnapshot({
25 * SnapshotIdentifier: `pre-migration-${runId}`,
26 * });
27 * ```
28 *
29 * @binding
30 */
31 export interface CreateClusterSnapshot extends Binding.Service<
32 CreateClusterSnapshot,
33 "AWS.Redshift.CreateClusterSnapshot",
34 (
35 cluster: Cluster,
36 ) => Effect.Effect<
37 (
38 request: Omit<redshift.CreateClusterSnapshotMessage, "ClusterIdentifier">,
39 ) => Effect.Effect<redshift.CreateClusterSnapshotResult, redshift.CreateClusterSnapshotError>
40 >
41 > {}
42 export const CreateClusterSnapshot = Binding.Service<CreateClusterSnapshot>(
43 "AWS.Redshift.CreateClusterSnapshot",
44 );