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
| 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:GetQueryExecution`. |
| 8 | * |
| 9 | * Reads the state, statistics, and configuration of a single query execution |
| 10 | * that ran in the bound workgroup. Provide the implementation with |
| 11 | * `Effect.provide(AWS.Athena.GetQueryExecutionHttp)`. |
| 12 | * ### Inspecting Query Executions |
| 13 | * **Example:** Check a Query's State |
| 14 | * ```typescript |
| 15 | * // init — bind the operation to the workgroup |
| 16 | * const getQueryExecution = yield* AWS.Athena.GetQueryExecution(workGroup); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const res = yield* getQueryExecution({ QueryExecutionId: id }); |
| 20 | * console.log(res.QueryExecution?.Status?.State); |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface GetQueryExecution extends Binding.Service< |
| 26 | GetQueryExecution, |
| 27 | "AWS.Athena.GetQueryExecution", |
| 28 | ( |
| 29 | workGroup: WorkGroup, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: athena.GetQueryExecutionInput, |
| 33 | ) => Effect.Effect<athena.GetQueryExecutionOutput, athena.GetQueryExecutionError> |
| 34 | > |
| 35 | > {} |
| 36 | |
| 37 | export const GetQueryExecution = Binding.Service<GetQueryExecution>("AWS.Athena.GetQueryExecution"); |