@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, 06:00 UTC

main
ts 36 lines 1.24 KB
Raw
1 import type * as cloudtrail from "@distilled.cloud/aws/cloudtrail";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { EventDataStore } from "./EventDataStore.ts";
5
6 /**
7 * Runtime binding for `cloudtrail:CancelQuery`.
8 *
9 * Cancels a running CloudTrail Lake query. Cancelling a query that already
10 * finished fails with the typed `InactiveQueryException`. Provide the
11 * implementation with `Effect.provide(AWS.CloudTrail.CancelQueryHttp)`.
12 * ### Querying CloudTrail Lake
13 * **Example:** Cancel a Running Query
14 * ```typescript
15 * // init — bind the operation to the event data store
16 * const cancelQuery = yield* AWS.CloudTrail.CancelQuery(store);
17 *
18 * // runtime
19 * const result = yield* cancelQuery({ QueryId: queryId });
20 * console.log(result.QueryStatus); // CANCELLED
21 * ```
22 *
23 * @binding
24 */
25 export interface CancelQuery extends Binding.Service<
26 CancelQuery,
27 "AWS.CloudTrail.CancelQuery",
28 (
29 store: EventDataStore,
30 ) => Effect.Effect<
31 (
32 request: Omit<cloudtrail.CancelQueryRequest, "EventDataStore">,
33 ) => Effect.Effect<cloudtrail.CancelQueryResponse, cloudtrail.CancelQueryError>
34 >
35 > {}
36 export const CancelQuery = Binding.Service<CancelQuery>("AWS.CloudTrail.CancelQuery");