1import * as eventbridge from "@distilled.cloud/aws/eventbridge";
2import * as Layer from "effect/Layer";
3import { makeEventBridgeRuleHttpBinding } from "./BindingHttp.ts";
4import { DisableRule } from "./DisableRule.ts";
5
6/**
7 * HTTP implementation of {@link DisableRule}. At deploy time it grants
8 * `events:DisableRule` on the bound rule; at runtime it calls the EventBridge
9 * API with the host Function's credentials. Provide this layer on the
10 * Function using the binding.
11 */
12export const DisableRuleHttp = Layer.effect(
13 DisableRule,
14 makeEventBridgeRuleHttpBinding({
15 tag: "AWS.EventBridge.DisableRule",
16 operation: eventbridge.disableRule,
17 actions: ["events:DisableRule"],
18 ruleNameKey: "Name",
19 }),
20);