@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.44 KB
Raw
1 import type * as serverless from "@distilled.cloud/aws/redshift-serverless";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Namespace } from "./Namespace.ts";
5
6 /**
7 * Runtime binding for the `CreateSnapshot` operation (IAM actions
8 * `redshift-serverless:CreateSnapshot` +
9 * `redshift-serverless:TagResource`).
10 *
11 * Takes a manual snapshot of the bound {@link Namespace} — e.g. a
12 * pre-migration backup function or a scheduled snapshot-rotation job. The
13 * namespace name is injected from the binding. Provide the implementation with
14 * `Effect.provide(AWS.RedshiftServerless.CreateSnapshotHttp)`.
15 * ### Managing Snapshots
16 * **Example:** Take a Manual Snapshot
17 * ```typescript
18 * // init — resolve the runtime client
19 * const createSnapshot = yield* AWS.RedshiftServerless.CreateSnapshot(namespace);
20 *
21 * // runtime
22 * yield* createSnapshot({
23 * snapshotName: `pre-migration-${runId}`,
24 * retentionPeriod: 7,
25 * });
26 * ```
27 *
28 * @binding
29 */
30 export interface CreateSnapshot extends Binding.Service<
31 CreateSnapshot,
32 "AWS.RedshiftServerless.CreateSnapshot",
33 (
34 namespace: Namespace,
35 ) => Effect.Effect<
36 (
37 request: Omit<serverless.CreateSnapshotRequest, "namespaceName">,
38 ) => Effect.Effect<serverless.CreateSnapshotResponse, serverless.CreateSnapshotError>
39 >
40 > {}
41 export const CreateSnapshot = Binding.Service<CreateSnapshot>(
42 "AWS.RedshiftServerless.CreateSnapshot",
43 );