@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 40 lines 1.36 KB
Raw
1 import type * as TSQ from "@distilled.cloud/aws/timestream-query";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 export interface CancelQueryRequest extends TSQ.CancelQueryRequest {}
6
7 /**
8 * Runtime binding for `timestream-query:CancelQuery` — cancel a running query
9 * by the `QueryId` a previous `Query` call reported.
10 *
11 * `timestream:CancelQuery` does not support resource-level permissions, so
12 * this is an account-level binding invoked with no resource argument.
13 *
14 * Provide `Timestream.CancelQueryHttp` on the Function to implement the
15 * binding.
16 *
17 * ### Querying Data
18 * **Example:** Cancel a running query
19 * ```typescript
20 * // init — account-level binding, no resource argument
21 * const cancelQuery = yield* Timestream.CancelQuery();
22 *
23 * // runtime — cancel by the QueryId from a prior Query response
24 * const result = yield* cancelQuery({ QueryId: queryId });
25 * // result.CancellationMessage reports whether the query was still running
26 * ```
27 *
28 * @binding
29 */
30 export interface CancelQuery extends Binding.Service<
31 CancelQuery,
32 "AWS.Timestream.CancelQuery",
33 () => Effect.Effect<
34 (
35 request: CancelQueryRequest,
36 ) => Effect.Effect<TSQ.CancelQueryResponse, TSQ.CancelQueryError | TSQ.DescribeEndpointsError>
37 >
38 > {}
39
40 export const CancelQuery = Binding.Service<CancelQuery>("AWS.Timestream.CancelQuery");