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:ListDatabases`.
8 *
9 * Lists the databases in the bound data catalog — the catalog name is
10 * injected automatically. Provide the implementation with
11 * `Effect.provide(AWS.Athena.ListDatabasesHttp)`.
12 * ### Browsing Catalog Metadata
13 * **Example:** List Databases in the Catalog
14 * ```typescript
15 * // init — bind the operation to the data catalog
16 * const listDatabases = yield* AWS.Athena.ListDatabases(catalog);
17 *
18 * // runtime
19 * const res = yield* listDatabases({});
20 * console.log(res.DatabaseList?.map((db) => db.Name));
21 * ```
22 *
23 * @binding
24 */
25export interface ListDatabases extends Binding.Service<
26 ListDatabases,
27 "AWS.Athena.ListDatabases",
28 (
29 catalog: DataCatalog,
30 ) => Effect.Effect<
31 (
32 request: Omit<athena.ListDatabasesInput, "CatalogName">,
33 ) => Effect.Effect<athena.ListDatabasesOutput, athena.ListDatabasesError>
34 >
35> {}
36
37export const ListDatabases = Binding.Service<ListDatabases>(
38 "AWS.Athena.ListDatabases",
39);