| 1 | import type * as dms from "@distilled.cloud/aws/database-migration-service"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `dms:DescribeEvents`. |
| 7 | * |
| 8 | * Bind this operation (account-level) to read recent DMS events — instance |
| 9 | * reboots, failovers, configuration changes — for monitoring and audit |
| 10 | * workloads. Provide the implementation with |
| 11 | * `Effect.provide(AWS.DMS.DescribeEventsHttp)`. |
| 12 | * ### Reading DMS Events |
| 13 | * **Example:** Read the Last Hour of Instance Events |
| 14 | * ```typescript |
| 15 | * // init — account-level, no target resource |
| 16 | * const describeEvents = yield* AWS.DMS.DescribeEvents(); |
| 17 | * |
| 18 | * // runtime |
| 19 | * const { Events } = yield* describeEvents({ |
| 20 | * SourceType: "replication-instance", |
| 21 | * Duration: 60, // minutes |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeEvents extends Binding.Service< |
| 28 | DescribeEvents, |
| 29 | "AWS.DMS.DescribeEvents", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request?: dms.DescribeEventsMessage, |
| 33 | ) => Effect.Effect<dms.DescribeEventsResponse, dms.DescribeEventsError> |
| 34 | > |
| 35 | > {} |
| 36 | |
| 37 | export const DescribeEvents = Binding.Service<DescribeEvents>( |
| 38 | "AWS.DMS.DescribeEvents", |
| 39 | ); |