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

main
ts 41 lines 1.31 KB
Raw
1 import * as im from "@distilled.cloud/aws/internetmonitor";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Monitor } from "./Monitor.ts";
5
6 export interface GetQueryResultsRequest extends Omit<im.GetQueryResultsInput, "MonitorName"> {}
7
8 /**
9 * Runtime binding for `internetmonitor:GetQueryResults` — fetch the result
10 * rows of a `SUCCEEDED` query on the bound {@link Monitor}; the monitor name
11 * is injected automatically.
12 *
13 * Provide `InternetMonitor.GetQueryResultsHttp` on the hosting Lambda
14 * Function to satisfy the requirement.
15 * ### Querying Measurements
16 * **Example:** Read Query Results
17 * ```typescript
18 * // init — grants internetmonitor:GetQueryResults on the monitor
19 * const getQueryResults = yield* AWS.InternetMonitor.GetQueryResults(monitor);
20 *
21 * // runtime
22 * const { Fields, Data } = yield* getQueryResults({ QueryId: queryId });
23 * ```
24 *
25 * @binding
26 */
27 export interface GetQueryResults extends Binding.Service<
28 GetQueryResults,
29 "AWS.InternetMonitor.GetQueryResults",
30 (
31 monitor: Monitor,
32 ) => Effect.Effect<
33 (
34 request: GetQueryResultsRequest,
35 ) => Effect.Effect<im.GetQueryResultsOutput, im.GetQueryResultsError>
36 >
37 > {}
38
39 export const GetQueryResults = Binding.Service<GetQueryResults>(
40 "AWS.InternetMonitor.GetQueryResults",
41 );