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

main
ts 41 lines 1.4 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 GetHealthEventRequest extends Omit<im.GetHealthEventInput, "MonitorName"> {}
7
8 /**
9 * Runtime binding for `internetmonitor:GetHealthEvent` — read the full
10 * detail (impacted locations, availability/performance measurements, impact
11 * type) of one health event on the bound {@link Monitor}; the monitor name
12 * is injected automatically.
13 *
14 * Provide `InternetMonitor.GetHealthEventHttp` on the hosting Lambda
15 * Function to satisfy the requirement.
16 * ### Reading Health Events
17 * **Example:** Read a Health Event by Id
18 * ```typescript
19 * // init — grants internetmonitor:GetHealthEvent on the monitor
20 * const getHealthEvent = yield* AWS.InternetMonitor.GetHealthEvent(monitor);
21 *
22 * // runtime
23 * const event = yield* getHealthEvent({ EventId: eventId });
24 * const locations = event.ImpactedLocations;
25 * ```
26 *
27 * @binding
28 */
29 export interface GetHealthEvent extends Binding.Service<
30 GetHealthEvent,
31 "AWS.InternetMonitor.GetHealthEvent",
32 (
33 monitor: Monitor,
34 ) => Effect.Effect<
35 (
36 request: GetHealthEventRequest,
37 ) => Effect.Effect<im.GetHealthEventOutput, im.GetHealthEventError>
38 >
39 > {}
40
41 export const GetHealthEvent = Binding.Service<GetHealthEvent>("AWS.InternetMonitor.GetHealthEvent");