| 1 | import * as eventbridge from "@distilled.cloud/aws/eventbridge"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeEventBridgeAccountHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { ListReplays } from "./ListReplays.ts"; |
| 5 | |
| 6 | /** |
| 7 | * HTTP implementation of {@link ListReplays}. At deploy time it grants |
| 8 | * `events:ListReplays` (the action does not support resource-level |
| 9 | * permissions); at runtime it calls the EventBridge API with the host |
| 10 | * Function's credentials. Provide this layer on the Function using the |
| 11 | * binding. |
| 12 | */ |
| 13 | export const ListReplaysHttp = Layer.effect( |
| 14 | ListReplays, |
| 15 | makeEventBridgeAccountHttpBinding({ |
| 16 | tag: "AWS.EventBridge.ListReplays", |
| 17 | operation: eventbridge.listReplays, |
| 18 | actions: ["events:ListReplays"], |
| 19 | }), |
| 20 | ); |