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