The best way to control Claude Code, Codex and more from any computer or phone
| 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 ListHealthEventsRequest extends Omit<im.ListHealthEventsInput, "MonitorName"> {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `internetmonitor:ListHealthEvents` — list the health |
| 10 | * events Internet Monitor created for the bound {@link Monitor}; the monitor |
| 11 | * name is injected automatically. |
| 12 | * |
| 13 | * Provide `InternetMonitor.ListHealthEventsHttp` on the hosting Lambda |
| 14 | * Function to satisfy the requirement. |
| 15 | * ### Reading Health Events |
| 16 | * **Example:** List Active Health Events |
| 17 | * ```typescript |
| 18 | * // init — grants internetmonitor:ListHealthEvents on the monitor |
| 19 | * const listHealthEvents = yield* AWS.InternetMonitor.ListHealthEvents(monitor); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { HealthEvents } = yield* listHealthEvents({ EventStatus: "ACTIVE" }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface ListHealthEvents extends Binding.Service< |
| 28 | ListHealthEvents, |
| 29 | "AWS.InternetMonitor.ListHealthEvents", |
| 30 | ( |
| 31 | monitor: Monitor, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request?: ListHealthEventsRequest, |
| 35 | ) => Effect.Effect<im.ListHealthEventsOutput, im.ListHealthEventsError> |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const ListHealthEvents = Binding.Service<ListHealthEvents>( |
| 40 | "AWS.InternetMonitor.ListHealthEvents", |
| 41 | ); |