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:BatchGetQueryExecution`.
8 *
9 * Reads up to 50 query executions from the bound workgroup in one call.
10 * Provide the implementation with
11 * `Effect.provide(AWS.Athena.BatchGetQueryExecutionHttp)`.
12 * ### Inspecting Query Executions
13 * **Example:** Read Several Executions at Once
14 * ```typescript
15 * // init — bind the operation to the workgroup
16 * const batchGetQueryExecution =
17 * yield* AWS.Athena.BatchGetQueryExecution(workGroup);
18 *
19 * // runtime
20 * const res = yield* batchGetQueryExecution({ QueryExecutionIds: ids });
21 * console.log(res.QueryExecutions?.map((qe) => qe.Status?.State));
22 * ```
23 *
24 * @binding
25 */
26export interface BatchGetQueryExecution extends Binding.Service<
27 BatchGetQueryExecution,
28 "AWS.Athena.BatchGetQueryExecution",
29 (
30 workGroup: WorkGroup,
31 ) => Effect.Effect<
32 (
33 request: athena.BatchGetQueryExecutionInput,
34 ) => Effect.Effect<
35 athena.BatchGetQueryExecutionOutput,
36 athena.BatchGetQueryExecutionError
37 >
38 >
39> {}
40
41export const BatchGetQueryExecution = Binding.Service<BatchGetQueryExecution>(
42 "AWS.Athena.BatchGetQueryExecution",
43);