ListRuleNamesByTarget
Source:
src/AWS/EventBridge/ListRuleNamesByTarget.ts
Lists the EventBridge rules that route events to a given target ARN
(events:ListRuleNamesByTarget).
Bind this operation inside a function runtime to introspect which rules
feed a target (e.g. the function itself, or one of its queues). Provide
the ListRuleNamesByTargetHttp layer on the Function to satisfy the
binding.
Listing Rules
Section titled “Listing Rules”// init — bind the operation (provide AWS.EventBridge.ListRuleNamesByTargetHttp on the Function)const listRuleNamesByTarget = yield* AWS.EventBridge.ListRuleNamesByTarget();
// runtime — find every rule routing to the targetconst { RuleNames } = yield* listRuleNamesByTarget({ TargetArn: "arn:aws:lambda:us-east-1:123456789012:function:my-fn",});