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

main
ts 43 lines 1.41 KB
Raw
1 import type * as athena from "@distilled.cloud/aws/athena";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { WorkGroup } from "./WorkGroup.ts";
5
6 /**
7 * Runtime binding for `athena:GetQueryRuntimeStatistics`.
8 *
9 * Reads the runtime statistics (timeline, rows/bytes processed, stage tree)
10 * of a query that ran in the bound workgroup. Provide the implementation with
11 * `Effect.provide(AWS.Athena.GetQueryRuntimeStatisticsHttp)`.
12 * ### Inspecting Query Executions
13 * **Example:** Read a Query's Runtime Statistics
14 * ```typescript
15 * // init — bind the operation to the workgroup
16 * const getQueryRuntimeStatistics =
17 * yield* AWS.Athena.GetQueryRuntimeStatistics(workGroup);
18 *
19 * // runtime
20 * const res = yield* getQueryRuntimeStatistics({ QueryExecutionId: id });
21 * console.log(res.QueryRuntimeStatistics?.Timeline?.TotalExecutionTimeInMillis);
22 * ```
23 *
24 * @binding
25 */
26 export interface GetQueryRuntimeStatistics extends Binding.Service<
27 GetQueryRuntimeStatistics,
28 "AWS.Athena.GetQueryRuntimeStatistics",
29 (
30 workGroup: WorkGroup,
31 ) => Effect.Effect<
32 (
33 request: athena.GetQueryRuntimeStatisticsInput,
34 ) => Effect.Effect<
35 athena.GetQueryRuntimeStatisticsOutput,
36 athena.GetQueryRuntimeStatisticsError
37 >
38 >
39 > {}
40
41 export const GetQueryRuntimeStatistics = Binding.Service<GetQueryRuntimeStatistics>(
42 "AWS.Athena.GetQueryRuntimeStatistics",
43 );