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:GetQueryExecution`.
8 *
9 * Reads the state, statistics, and configuration of a single query execution
10 * that ran in the bound workgroup. Provide the implementation with
11 * `Effect.provide(AWS.Athena.GetQueryExecutionHttp)`.
12 * ### Inspecting Query Executions
13 * **Example:** Check a Query's State
14 * ```typescript
15 * // init — bind the operation to the workgroup
16 * const getQueryExecution = yield* AWS.Athena.GetQueryExecution(workGroup);
17 *
18 * // runtime
19 * const res = yield* getQueryExecution({ QueryExecutionId: id });
20 * console.log(res.QueryExecution?.Status?.State);
21 * ```
22 *
23 * @binding
24 */
25export interface GetQueryExecution extends Binding.Service<
26 GetQueryExecution,
27 "AWS.Athena.GetQueryExecution",
28 (
29 workGroup: WorkGroup,
30 ) => Effect.Effect<
31 (
32 request: athena.GetQueryExecutionInput,
33 ) => Effect.Effect<
34 athena.GetQueryExecutionOutput,
35 athena.GetQueryExecutionError
36 >
37 >
38> {}
39
40export const GetQueryExecution = Binding.Service<GetQueryExecution>(
41 "AWS.Athena.GetQueryExecution",
42);