1import type * as athena from "@distilled.cloud/aws/athena";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { WorkGroup } from "./WorkGroup.ts";
5
6/**
7 * Runtime binding for `athena:ListPreparedStatements`.
8 *
9 * Lists the prepared statements (name + last-modified time) in the bound
10 * workgroup — the workgroup name is injected automatically. Provide the
11 * implementation with `Effect.provide(AWS.Athena.ListPreparedStatementsHttp)`.
12 * ### Prepared Statements
13 * **Example:** List the Workgroup's Prepared Statements
14 * ```typescript
15 * // init — bind the operation to the workgroup
16 * const listPreparedStatements =
17 * yield* AWS.Athena.ListPreparedStatements(workGroup);
18 *
19 * // runtime
20 * const res = yield* listPreparedStatements({ MaxResults: 50 });
21 * console.log(res.PreparedStatements?.map((s) => s.StatementName));
22 * ```
23 *
24 * @binding
25 */
26export interface ListPreparedStatements extends Binding.Service<
27 ListPreparedStatements,
28 "AWS.Athena.ListPreparedStatements",
29 (
30 workGroup: WorkGroup,
31 ) => Effect.Effect<
32 (
33 request: Omit<athena.ListPreparedStatementsInput, "WorkGroup">,
34 ) => Effect.Effect<
35 athena.ListPreparedStatementsOutput,
36 athena.ListPreparedStatementsError
37 >
38 >
39> {}
40
41export const ListPreparedStatements = Binding.Service<ListPreparedStatements>(
42 "AWS.Athena.ListPreparedStatements",
43);