1import type * as eventbridge from "@distilled.cloud/aws/eventbridge";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5export interface ListRuleNamesByTargetRequest
6 extends eventbridge.ListRuleNamesByTargetRequest {}
7
8/**
9 * Lists the EventBridge rules that route events to a given target ARN
10 * (`events:ListRuleNamesByTarget`).
11 *
12 * Bind this operation inside a function runtime to introspect which rules
13 * feed a target (e.g. the function itself, or one of its queues). Provide
14 * the `ListRuleNamesByTargetHttp` layer on the Function to satisfy the
15 * binding.
16 * ### Listing Rules
17 * **Example:** List Rules Feeding a Target
18 * ```typescript
19 * // init — bind the operation (provide AWS.EventBridge.ListRuleNamesByTargetHttp on the Function)
20 * const listRuleNamesByTarget = yield* AWS.EventBridge.ListRuleNamesByTarget();
21 *
22 * // runtime — find every rule routing to the target
23 * const { RuleNames } = yield* listRuleNamesByTarget({
24 * TargetArn: "arn:aws:lambda:us-east-1:123456789012:function:my-fn",
25 * });
26 * ```
27 *
28 * @binding
29 */
30export interface ListRuleNamesByTarget extends Binding.Service<
31 ListRuleNamesByTarget,
32 "AWS.EventBridge.ListRuleNamesByTarget",
33 () => Effect.Effect<
34 (
35 request: ListRuleNamesByTargetRequest,
36 ) => Effect.Effect<
37 eventbridge.ListRuleNamesByTargetResponse,
38 eventbridge.ListRuleNamesByTargetError
39 >
40 >
41> {}
42export const ListRuleNamesByTarget = Binding.Service<ListRuleNamesByTarget>(
43 "AWS.EventBridge.ListRuleNamesByTarget",
44);