@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 35 lines 1.25 KB
Raw
1 import type * as Logs from "@distilled.cloud/aws/cloudwatch-logs";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { LogGroup } from "./LogGroup.ts";
5
6 export interface StopQueryRequest extends Logs.StopQueryRequest {}
7
8 /**
9 * Runtime binding for `logs:StopQuery` (CloudWatch Logs Insights).
10 *
11 * Bind this operation to the `LogGroup` an Insights query was started against
12 * (via {@link import("./StartQuery.ts").StartQuery}) to cancel it while it is
13 * still `Scheduled` or `Running` — e.g. on caller timeout or shutdown.
14 * ### Logs Insights
15 * **Example:** Cancel a Running Query
16 * ```typescript
17 * const startQuery = yield* AWS.Logs.StartQuery(logGroup);
18 * const stopQuery = yield* AWS.Logs.StopQuery(logGroup);
19 *
20 * const { queryId } = yield* startQuery({ queryString, startTime, endTime });
21 * const { success } = yield* stopQuery({ queryId: queryId! });
22 * ```
23 *
24 * @binding
25 */
26 export interface StopQuery extends Binding.Service<
27 StopQuery,
28 "AWS.Logs.StopQuery",
29 <G extends LogGroup>(
30 logGroup: G,
31 ) => Effect.Effect<
32 (request: StopQueryRequest) => Effect.Effect<Logs.StopQueryResponse, Logs.StopQueryError>
33 >
34 > {}
35 export const StopQuery = Binding.Service<StopQuery>("AWS.Logs.StopQuery");