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