| 1 | import type * as dax from "@distilled.cloud/aws/dax"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `DescribeEvents` operation (IAM action |
| 7 | * `dax:DescribeEvents`). |
| 8 | * |
| 9 | * Returns events related to DAX clusters and parameter groups from the last |
| 10 | * 24 hours (up to 14 days with an explicit time window) — node reboots, |
| 11 | * failovers, configuration changes. Provide the implementation with |
| 12 | * `Effect.provide(AWS.DAX.DescribeEventsHttp)`. |
| 13 | * ### Monitoring Clusters |
| 14 | * **Example:** Read a Cluster's Recent Events |
| 15 | * ```typescript |
| 16 | * const describeEvents = yield* DAX.DescribeEvents(); |
| 17 | * |
| 18 | * const page = yield* describeEvents({ |
| 19 | * SourceName: clusterName, |
| 20 | * SourceType: "CLUSTER", |
| 21 | * }); |
| 22 | * for (const event of page.Events ?? []) { |
| 23 | * yield* Effect.logInfo(`${event.Date}: ${event.Message}`); |
| 24 | * } |
| 25 | * ``` |
| 26 | * |
| 27 | * @binding |
| 28 | */ |
| 29 | export interface DescribeEvents extends Binding.Service< |
| 30 | DescribeEvents, |
| 31 | "AWS.DAX.DescribeEvents", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request?: dax.DescribeEventsRequest, |
| 35 | ) => Effect.Effect<dax.DescribeEventsResponse, dax.DescribeEventsError> |
| 36 | > |
| 37 | > {} |
| 38 | export const DescribeEvents = Binding.Service<DescribeEvents>( |
| 39 | "AWS.DAX.DescribeEvents", |
| 40 | ); |