@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 37 lines 1.26 KB
Raw
1 import type * as DynamoDB from "@distilled.cloud/aws/dynamodb";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Table } from "./Table.ts";
5
6 export interface CreateBackupRequest extends Omit<DynamoDB.CreateBackupInput, "TableName"> {}
7
8 /**
9 * Runtime binding for `dynamodb:CreateBackup`.
10 *
11 * Bind this operation to a `Table` inside a function runtime to get a callable
12 * that creates an on-demand backup of the bound table, automatically injecting
13 * the table name. Provide the `CreateBackupHttp` layer on the Function to
14 * satisfy the binding.
15 * ### Backup and Restore
16 * **Example:** Create an On-Demand Backup
17 * ```typescript
18 * const createBackup = yield* AWS.DynamoDB.CreateBackup(table);
19 *
20 * const response = yield* createBackup({ BackupName: "nightly" });
21 * const backupArn = response.BackupDetails?.BackupArn;
22 * ```
23 *
24 * @binding
25 */
26 export interface CreateBackup extends Binding.Service<
27 CreateBackup,
28 "AWS.DynamoDB.CreateBackup",
29 <T extends Table>(
30 table: T,
31 ) => Effect.Effect<
32 (
33 request: CreateBackupRequest,
34 ) => Effect.Effect<DynamoDB.CreateBackupOutput, DynamoDB.CreateBackupError>
35 >
36 > {}
37 export const CreateBackup = Binding.Service<CreateBackup>("AWS.DynamoDB.CreateBackup");