| 1 | import type * as DynamoDB from "@distilled.cloud/aws/dynamodb"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Table } from "./Table.ts"; |
| 5 | |
| 6 | export interface DescribeContinuousBackupsRequest extends Omit< |
| 7 | DynamoDB.DescribeContinuousBackupsInput, |
| 8 | "TableName" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `dynamodb:DescribeContinuousBackups`. |
| 13 | * |
| 14 | * Bind this operation to a `Table` inside a function runtime to get a callable |
| 15 | * that reads the bound table's continuous-backup and point-in-time-recovery |
| 16 | * status (including the earliest and latest restorable times), automatically |
| 17 | * injecting the table name. Provide the `DescribeContinuousBackupsHttp` layer |
| 18 | * on the Function to satisfy the binding. |
| 19 | * ### Backup and Restore |
| 20 | * **Example:** Read the PITR Window |
| 21 | * ```typescript |
| 22 | * const describeContinuousBackups = |
| 23 | * yield* AWS.DynamoDB.DescribeContinuousBackups(table); |
| 24 | * |
| 25 | * const response = yield* describeContinuousBackups(); |
| 26 | * const pitr = |
| 27 | * response.ContinuousBackupsDescription?.PointInTimeRecoveryDescription; |
| 28 | * ``` |
| 29 | * |
| 30 | * @binding |
| 31 | */ |
| 32 | export interface DescribeContinuousBackups extends Binding.Service< |
| 33 | DescribeContinuousBackups, |
| 34 | "AWS.DynamoDB.DescribeContinuousBackups", |
| 35 | <T extends Table>( |
| 36 | table: T, |
| 37 | ) => Effect.Effect< |
| 38 | ( |
| 39 | request?: DescribeContinuousBackupsRequest, |
| 40 | ) => Effect.Effect< |
| 41 | DynamoDB.DescribeContinuousBackupsOutput, |
| 42 | DynamoDB.DescribeContinuousBackupsError |
| 43 | > |
| 44 | > |
| 45 | > {} |
| 46 | export const DescribeContinuousBackups = |
| 47 | Binding.Service<DescribeContinuousBackups>( |
| 48 | "AWS.DynamoDB.DescribeContinuousBackups", |
| 49 | ); |