Skip to content

ListTargetsByRule

Source: src/AWS/EventBridge/ListTargetsByRule.ts

Lists the targets attached to an EventBridge rule (events:ListTargetsByRule).

Bind this operation to a Rule inside a function runtime to get a callable that automatically injects the rule and bus names. Provide the ListTargetsByRuleHttp layer on the Function to satisfy the binding.

// init — bind the rule (provide AWS.EventBridge.ListTargetsByRuleHttp on the Function)
const listTargets = yield* AWS.EventBridge.ListTargetsByRule(rule);
// runtime — enumerate the rule's targets
const { Targets } = yield* listTargets();