1import type * as neptunegraph from "@distilled.cloud/aws/neptune-graph";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Graph } from "./Graph.ts";
5
6/**
7 * Runtime binding for the `CancelQuery` operation (IAM action `neptune-graph:CancelQuery`),
8 * scoped to one {@link Graph}.
9 *
10 * Cancels a query running on the bound graph by its query id — e.g. kill a runaway openCypher traversal found via {@link ListQueries}. Provide the implementation with
11 * `Effect.provide(AWS.NeptuneGraph.CancelQueryHttp)`.
12 * ### Managing Queries
13 * **Example:** Cancel a runaway query
14 * ```typescript
15 * const cancelQuery = yield* NeptuneGraph.CancelQuery(graph);
16 *
17 * yield* cancelQuery({ queryId });
18 * ```
19 *
20 * @binding
21 */
22export interface CancelQuery extends Binding.Service<
23 CancelQuery,
24 "AWS.NeptuneGraph.CancelQuery",
25 (
26 graph: Graph,
27 ) => Effect.Effect<
28 (
29 request: Omit<neptunegraph.CancelQueryInput, "graphIdentifier">,
30 ) => Effect.Effect<
31 neptunegraph.CancelQueryResponse,
32 neptunegraph.CancelQueryError
33 >
34 >
35> {}
36export const CancelQuery = Binding.Service<CancelQuery>(
37 "AWS.NeptuneGraph.CancelQuery",
38);