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