@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 54 lines 1.7 KB
Raw
1 import * as DynamoDB from "@distilled.cloud/aws/dynamodb";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Table } from "./Table.ts";
5
6 export interface RestoreTableToPointInTimeRequest extends Omit<
7 DynamoDB.RestoreTableToPointInTimeInput,
8 "SourceTableArn" | "SourceTableName" | "TargetTableName"
9 > {}
10
11 /**
12 * Runtime binding for `dynamodb:RestoreTableToPointInTime`.
13 *
14 * Bind this operation to a source and a target `Table` inside a function
15 * runtime to get a callable that restores the source's point-in-time backup
16 * into the target, automatically injecting both table identifiers. The source
17 * table must have point-in-time recovery enabled. Provide the
18 * `RestoreTableToPointInTimeHttp` layer on the Function to satisfy the
19 * binding.
20 * ### Backup and Restore
21 * **Example:** Restore to the Latest Restorable Time
22 * ```typescript
23 * const restore = yield* AWS.DynamoDB.RestoreTableToPointInTime(
24 * sourceTable,
25 * restoreTargetTable,
26 * );
27 *
28 * const response = yield* restore({
29 * UseLatestRestorableTime: true,
30 * });
31 * const status = response.TableDescription?.TableStatus;
32 * ```
33 *
34 * @binding
35 */
36 export interface RestoreTableToPointInTime extends Binding.Service<
37 RestoreTableToPointInTime,
38 "AWS.DynamoDB.RestoreTableToPointInTime",
39 <From extends Table, To extends Table>(
40 from: From,
41 to: To,
42 ) => Effect.Effect<
43 (
44 request: RestoreTableToPointInTimeRequest,
45 ) => Effect.Effect<
46 DynamoDB.RestoreTableToPointInTimeOutput,
47 DynamoDB.RestoreTableToPointInTimeError
48 >
49 >
50 > {}
51
52 export const RestoreTableToPointInTime = Binding.Service<RestoreTableToPointInTime>(
53 "AWS.DynamoDB.RestoreTableToPointInTime",
54 );