| 1 | import type * as eventbridge from "@distilled.cloud/aws/eventbridge"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | export interface CancelReplayRequest extends eventbridge.CancelReplayRequest {} |
| 6 | |
| 7 | /** |
| 8 | * Cancels a running event replay (`events:CancelReplay`). |
| 9 | * |
| 10 | * Bind this operation inside a function runtime to abort a replay started |
| 11 | * with `StartReplay`. Cancelling a replay that already completed fails with |
| 12 | * the typed `IllegalStatusException`. Provide the `CancelReplayHttp` layer |
| 13 | * on the Function to satisfy the binding. |
| 14 | * ### Replaying Events |
| 15 | * **Example:** Cancel a Running Replay |
| 16 | * ```typescript |
| 17 | * // init — bind the operation (provide AWS.EventBridge.CancelReplayHttp on the Function) |
| 18 | * const cancelReplay = yield* AWS.EventBridge.CancelReplay(); |
| 19 | * |
| 20 | * // runtime — abort the replay |
| 21 | * yield* cancelReplay({ ReplayName: "backfill-2026-07-14" }); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface CancelReplay extends Binding.Service< |
| 27 | CancelReplay, |
| 28 | "AWS.EventBridge.CancelReplay", |
| 29 | () => Effect.Effect< |
| 30 | ( |
| 31 | request: CancelReplayRequest, |
| 32 | ) => Effect.Effect< |
| 33 | eventbridge.CancelReplayResponse, |
| 34 | eventbridge.CancelReplayError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | export const CancelReplay = Binding.Service<CancelReplay>( |
| 39 | "AWS.EventBridge.CancelReplay", |
| 40 | ); |