1import type * as athena from "@distilled.cloud/aws/athena";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { DataCatalog } from "./DataCatalog.ts";
5
6/**
7 * Runtime binding for `athena:ListTableMetadata`.
8 *
9 * Lists table metadata for a database in the bound data catalog — the
10 * catalog name is injected automatically; `Expression` filters table names.
11 * Provide the implementation with
12 * `Effect.provide(AWS.Athena.ListTableMetadataHttp)`.
13 * ### Browsing Catalog Metadata
14 * **Example:** List a Database's Tables
15 * ```typescript
16 * // init — bind the operation to the data catalog
17 * const listTableMetadata = yield* AWS.Athena.ListTableMetadata(catalog);
18 *
19 * // runtime
20 * const res = yield* listTableMetadata({ DatabaseName: "analytics" });
21 * console.log(res.TableMetadataList?.map((t) => t.Name));
22 * ```
23 *
24 * @binding
25 */
26export interface ListTableMetadata extends Binding.Service<
27 ListTableMetadata,
28 "AWS.Athena.ListTableMetadata",
29 (
30 catalog: DataCatalog,
31 ) => Effect.Effect<
32 (
33 request: Omit<athena.ListTableMetadataInput, "CatalogName">,
34 ) => Effect.Effect<
35 athena.ListTableMetadataOutput,
36 athena.ListTableMetadataError
37 >
38 >
39> {}
40
41export const ListTableMetadata = Binding.Service<ListTableMetadata>(
42 "AWS.Athena.ListTableMetadata",
43);