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