1import type * as eventbridge from "@distilled.cloud/aws/eventbridge";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5export interface DescribeReplayRequest
6 extends eventbridge.DescribeReplayRequest {}
7
8/**
9 * Reads the progress and state of an event replay
10 * (`events:DescribeReplay`).
11 *
12 * Bind this operation inside a function runtime to poll a replay started
13 * with `StartReplay` until it completes. Provide the `DescribeReplayHttp`
14 * layer on the Function to satisfy the binding.
15 * ### Replaying Events
16 * **Example:** Poll a Replay's State
17 * ```typescript
18 * // init — bind the operation (provide AWS.EventBridge.DescribeReplayHttp on the Function)
19 * const describeReplay = yield* AWS.EventBridge.DescribeReplay();
20 *
21 * // runtime — read the replay's state and progress
22 * const replay = yield* describeReplay({ ReplayName: "backfill-2026-07-14" });
23 * console.log(replay.State, replay.EventLastReplayedTime);
24 * ```
25 *
26 * @binding
27 */
28export interface DescribeReplay extends Binding.Service<
29 DescribeReplay,
30 "AWS.EventBridge.DescribeReplay",
31 () => Effect.Effect<
32 (
33 request: DescribeReplayRequest,
34 ) => Effect.Effect<
35 eventbridge.DescribeReplayResponse,
36 eventbridge.DescribeReplayError
37 >
38 >
39> {}
40export const DescribeReplay = Binding.Service<DescribeReplay>(
41 "AWS.EventBridge.DescribeReplay",
42);