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, 06:00 UTC
| 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 ListBackupsRequest extends Omit<DynamoDB.ListBackupsInput, "TableName"> {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `dynamodb:ListBackups`. |
| 10 | * |
| 11 | * Bind this operation to a `Table` inside a function runtime to get a callable |
| 12 | * that lists the bound table's on-demand backups, automatically injecting the |
| 13 | * table name. Provide the `ListBackupsHttp` layer on the Function to satisfy |
| 14 | * the binding. |
| 15 | * ### Backup and Restore |
| 16 | * **Example:** List the Bound Table's Backups |
| 17 | * ```typescript |
| 18 | * const listBackups = yield* AWS.DynamoDB.ListBackups(table); |
| 19 | * |
| 20 | * const response = yield* listBackups(); |
| 21 | * const backups = response.BackupSummaries; |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface ListBackups extends Binding.Service< |
| 27 | ListBackups, |
| 28 | "AWS.DynamoDB.ListBackups", |
| 29 | <T extends Table>( |
| 30 | table: T, |
| 31 | ) => Effect.Effect< |
| 32 | ( |
| 33 | request?: ListBackupsRequest, |
| 34 | ) => Effect.Effect<DynamoDB.ListBackupsOutput, DynamoDB.ListBackupsError> |
| 35 | > |
| 36 | > {} |
| 37 | export const ListBackups = Binding.Service<ListBackups>("AWS.DynamoDB.ListBackups"); |