Skip to content

DisableRule

Source: src/AWS/EventBridge/DisableRule.ts

Disables an EventBridge rule (events:DisableRule) so it stops matching events without deleting it.

Bind this operation to a Rule inside a function runtime to get a callable that pauses the rule — the runtime half of a feature toggle or kill switch. Provide the DisableRuleHttp layer on the Function to satisfy the binding.

// init — bind the rule (provide AWS.EventBridge.DisableRuleHttp on the Function)
const disableRule = yield* AWS.EventBridge.DisableRule(rule);
// runtime — stop event routing until re-enabled
yield* disableRule();