| 1 | import type * as memorydb from "@distilled.cloud/aws/memorydb"; |
| 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 | * `memorydb:DescribeEvents`). |
| 8 | * |
| 9 | * Returns events related to clusters, security groups, and parameter groups |
| 10 | * from the last hour (up to 14 days with an explicit time window) — snapshot |
| 11 | * completions, failovers, configuration changes. Provide the implementation |
| 12 | * with `Effect.provide(AWS.MemoryDB.DescribeEventsHttp)`. |
| 13 | * ### Monitoring Clusters |
| 14 | * **Example:** Read a Cluster's Recent Events |
| 15 | * ```typescript |
| 16 | * const describeEvents = yield* MemoryDB.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.MemoryDB.DescribeEvents", |
| 32 | () => Effect.Effect< |
| 33 | ( |
| 34 | request?: memorydb.DescribeEventsRequest, |
| 35 | ) => Effect.Effect< |
| 36 | memorydb.DescribeEventsResponse, |
| 37 | memorydb.DescribeEventsError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const DescribeEvents = Binding.Service<DescribeEvents>( |
| 42 | "AWS.MemoryDB.DescribeEvents", |
| 43 | ); |