| 1 | import type * as bcm from "@distilled.cloud/aws/bcm-data-exports"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Request for {@link ListTables}. |
| 7 | */ |
| 8 | export interface ListTablesRequest extends bcm.ListTablesRequest {} |
| 9 | |
| 10 | /** |
| 11 | * Runtime binding for `bcm-data-exports:ListTables`. |
| 12 | * |
| 13 | * An account-level operation (the table dictionary is not tied to any |
| 14 | * export) that enumerates every table available to Data Exports queries, |
| 15 | * with each table's configurable properties. Useful for query builders that |
| 16 | * present the available data sources. Provide the implementation with |
| 17 | * `Effect.provide(AWS.BCMDataExports.ListTablesHttp)`. |
| 18 | * ### Browsing the Table Dictionary |
| 19 | * **Example:** List the Available Tables |
| 20 | * ```typescript |
| 21 | * // init — account-level binding takes no resource |
| 22 | * const listTables = yield* AWS.BCMDataExports.ListTables(); |
| 23 | * |
| 24 | * // runtime |
| 25 | * const result = yield* listTables(); |
| 26 | * const names = (result.Tables ?? []).map((table) => table.TableName); |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface ListTables extends Binding.Service< |
| 32 | ListTables, |
| 33 | "AWS.BCMDataExports.ListTables", |
| 34 | () => Effect.Effect< |
| 35 | ( |
| 36 | request?: ListTablesRequest, |
| 37 | ) => Effect.Effect<bcm.ListTablesResponse, bcm.ListTablesError> |
| 38 | > |
| 39 | > {} |
| 40 | |
| 41 | export const ListTables = Binding.Service<ListTables>( |
| 42 | "AWS.BCMDataExports.ListTables", |
| 43 | ); |