| 1 | import type * as redshift from "@distilled.cloud/aws/redshift"; |
| 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 | * `redshift:DescribeEvents`). |
| 8 | * |
| 9 | * Lists recent events (maintenance, resizes, snapshots, security changes) |
| 10 | * for the account's Redshift clusters and related resources over the last 14 |
| 11 | * days — the audit trail for operational tooling. For push delivery of the |
| 12 | * same events see {@link EventSubscription}. Provide the implementation with |
| 13 | * `Effect.provide(AWS.Redshift.DescribeEventsHttp)`. |
| 14 | * ### Monitoring Clusters |
| 15 | * **Example:** List a Cluster's Recent Events |
| 16 | * ```typescript |
| 17 | * const describeEvents = yield* AWS.Redshift.DescribeEvents(); |
| 18 | * |
| 19 | * const page = yield* describeEvents({ |
| 20 | * SourceIdentifier: clusterId, |
| 21 | * SourceType: "cluster", |
| 22 | * }); |
| 23 | * const messages = page.Events?.map((e) => e.Message); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface DescribeEvents extends Binding.Service< |
| 29 | DescribeEvents, |
| 30 | "AWS.Redshift.DescribeEvents", |
| 31 | () => Effect.Effect< |
| 32 | ( |
| 33 | request?: redshift.DescribeEventsMessage, |
| 34 | ) => Effect.Effect<redshift.EventsMessage, redshift.DescribeEventsError> |
| 35 | > |
| 36 | > {} |
| 37 | export const DescribeEvents = Binding.Service<DescribeEvents>( |
| 38 | "AWS.Redshift.DescribeEvents", |
| 39 | ); |