1import * as im from "@distilled.cloud/aws/internetmonitor";
2import * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Monitor } from "./Monitor.ts";
5
6export interface StopQueryRequest extends Omit<
7 im.StopQueryInput,
8 "MonitorName"
9> {}
10
11/**
12 * Runtime binding for `internetmonitor:StopQuery` — cancel an in-progress
13 * query on the bound {@link Monitor}; the monitor name is injected
14 * automatically.
15 *
16 * Provide `InternetMonitor.StopQueryHttp` on the hosting Lambda Function to
17 * satisfy the requirement.
18 * ### Querying Measurements
19 * **Example:** Cancel a Running Query
20 * ```typescript
21 * // init — grants internetmonitor:StopQuery on the monitor
22 * const stopQuery = yield* AWS.InternetMonitor.StopQuery(monitor);
23 *
24 * // runtime
25 * yield* stopQuery({ QueryId: queryId });
26 * ```
27 *
28 * @binding
29 */
30export interface StopQuery extends Binding.Service<
31 StopQuery,
32 "AWS.InternetMonitor.StopQuery",
33 (
34 monitor: Monitor,
35 ) => Effect.Effect<
36 (
37 request: StopQueryRequest,
38 ) => Effect.Effect<im.StopQueryOutput, im.StopQueryError>
39 >
40> {}
41
42export const StopQuery = Binding.Service<StopQuery>(
43 "AWS.InternetMonitor.StopQuery",
44);