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:StopQueryExecution`.
8 *
9 * Cancels a running query in the bound workgroup. Stopping an already
10 * finished query is a no-op, so the call is safely idempotent. Provide the
11 * implementation with `Effect.provide(AWS.Athena.StopQueryExecutionHttp)`.
12 * ### Cancelling Queries
13 * **Example:** Cancel a Runaway Query
14 * ```typescript
15 * // init — bind the operation to the workgroup
16 * const stopQueryExecution = yield* AWS.Athena.StopQueryExecution(workGroup);
17 *
18 * // runtime
19 * yield* stopQueryExecution({ QueryExecutionId: id });
20 * ```
21 *
22 * @binding
23 */
24export interface StopQueryExecution extends Binding.Service<
25 StopQueryExecution,
26 "AWS.Athena.StopQueryExecution",
27 (
28 workGroup: WorkGroup,
29 ) => Effect.Effect<
30 (
31 request: athena.StopQueryExecutionInput,
32 ) => Effect.Effect<
33 athena.StopQueryExecutionOutput,
34 athena.StopQueryExecutionError
35 >
36 >
37> {}
38
39export const StopQueryExecution = Binding.Service<StopQueryExecution>(
40 "AWS.Athena.StopQueryExecution",
41);