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 DescribeBackupRequest extends DynamoDB.DescribeBackupInput {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `dynamodb:DescribeBackup`. |
| 10 | * |
| 11 | * Bind this operation to a `Table` inside a function runtime to get a callable |
| 12 | * that reads the status and details of one of the bound table's backups by |
| 13 | * ARN. The IAM grant covers every backup of the bound table |
| 14 | * (`{tableArn}/backup/*`). Provide the `DescribeBackupHttp` layer on the |
| 15 | * Function to satisfy the binding. |
| 16 | * ### Backup and Restore |
| 17 | * **Example:** Poll a Backup Until It Is Available |
| 18 | * ```typescript |
| 19 | * const describeBackup = yield* AWS.DynamoDB.DescribeBackup(table); |
| 20 | * |
| 21 | * const response = yield* describeBackup({ BackupArn: backupArn }); |
| 22 | * const status = response.BackupDescription?.BackupDetails?.BackupStatus; |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeBackup extends Binding.Service< |
| 28 | DescribeBackup, |
| 29 | "AWS.DynamoDB.DescribeBackup", |
| 30 | <T extends Table>( |
| 31 | table: T, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: DescribeBackupRequest, |
| 35 | ) => Effect.Effect<DynamoDB.DescribeBackupOutput, DynamoDB.DescribeBackupError> |
| 36 | > |
| 37 | > {} |
| 38 | export const DescribeBackup = Binding.Service<DescribeBackup>("AWS.DynamoDB.DescribeBackup"); |