@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.37 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
5 export interface GetInternetEventRequest extends im.GetInternetEventInput {}
6
7 /**
8 * Runtime binding for `internetmonitor:GetInternetEvent` — read the detail
9 * (impacted client location, start/end time, type, status) of one global
10 * internet event from the outages map Internet Monitor publishes for all
11 * AWS customers. Internet events are account-level; no monitor is required.
12 *
13 * Provide `InternetMonitor.GetInternetEventHttp` on the hosting Lambda
14 * Function to satisfy the requirement.
15 * ### Reading Internet Events
16 * **Example:** Read an Internet Event by Id
17 * ```typescript
18 * // init — grants internetmonitor:GetInternetEvent
19 * const getInternetEvent = yield* AWS.InternetMonitor.GetInternetEvent();
20 *
21 * // runtime
22 * const event = yield* getInternetEvent({ EventId: eventId });
23 * const location = event.ClientLocation;
24 * ```
25 *
26 * @binding
27 */
28 export interface GetInternetEvent extends Binding.Service<
29 GetInternetEvent,
30 "AWS.InternetMonitor.GetInternetEvent",
31 () => Effect.Effect<
32 (
33 request: GetInternetEventRequest,
34 ) => Effect.Effect<im.GetInternetEventOutput, im.GetInternetEventError>
35 >
36 > {}
37
38 export const GetInternetEvent = Binding.Service<GetInternetEvent>(
39 "AWS.InternetMonitor.GetInternetEvent",
40 );