| 1 | import type * as athena from "@distilled.cloud/aws/athena"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { WorkGroup } from "./WorkGroup.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `athena:ListQueryExecutions`. |
| 8 | * |
| 9 | * Lists recent query execution IDs in the bound workgroup (newest first) — |
| 10 | * the workgroup name is injected automatically. Provide the implementation |
| 11 | * with `Effect.provide(AWS.Athena.ListQueryExecutionsHttp)`. |
| 12 | * ### Inspecting Query Executions |
| 13 | * **Example:** List Recent Executions in the Workgroup |
| 14 | * ```typescript |
| 15 | * // init — bind the operation to the workgroup |
| 16 | * const listQueryExecutions = yield* AWS.Athena.ListQueryExecutions(workGroup); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const res = yield* listQueryExecutions({ MaxResults: 10 }); |
| 20 | * console.log(res.QueryExecutionIds); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface ListQueryExecutions extends Binding.Service< |
| 26 | ListQueryExecutions, |
| 27 | "AWS.Athena.ListQueryExecutions", |
| 28 | ( |
| 29 | workGroup: WorkGroup, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: Omit<athena.ListQueryExecutionsInput, "WorkGroup">, |
| 33 | ) => Effect.Effect< |
| 34 | athena.ListQueryExecutionsOutput, |
| 35 | athena.ListQueryExecutionsError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | |
| 40 | export const ListQueryExecutions = Binding.Service<ListQueryExecutions>( |
| 41 | "AWS.Athena.ListQueryExecutions", |
| 42 | ); |