@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 43 lines 1.39 KB
Raw
1 import * as eventbridge from "@distilled.cloud/aws/eventbridge";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { Rule } from "./Rule.ts";
5
6 export interface ListTargetsByRuleRequest extends Omit<
7 eventbridge.ListTargetsByRuleRequest,
8 "Rule" | "EventBusName"
9 > {}
10
11 /**
12 * Lists the targets attached to an EventBridge rule
13 * (`events:ListTargetsByRule`).
14 *
15 * Bind this operation to a {@link Rule} inside a function runtime to get a
16 * callable that automatically injects the rule and bus names. Provide the
17 * `ListTargetsByRuleHttp` layer on the Function to satisfy the binding.
18 * ### Listing Targets
19 * **Example:** List a Rule's Targets
20 * ```typescript
21 * // init — bind the rule (provide AWS.EventBridge.ListTargetsByRuleHttp on the Function)
22 * const listTargets = yield* AWS.EventBridge.ListTargetsByRule(rule);
23 *
24 * // runtime — enumerate the rule's targets
25 * const { Targets } = yield* listTargets();
26 * ```
27 *
28 * @binding
29 */
30 export interface ListTargetsByRule extends Binding.Service<
31 ListTargetsByRule,
32 "AWS.EventBridge.ListTargetsByRule",
33 (
34 rule: Rule,
35 ) => Effect.Effect<
36 (
37 request?: ListTargetsByRuleRequest,
38 ) => Effect.Effect<eventbridge.ListTargetsByRuleResponse, eventbridge.ListTargetsByRuleError>
39 >
40 > {}
41 export const ListTargetsByRule = Binding.Service<ListTargetsByRule>(
42 "AWS.EventBridge.ListTargetsByRule",
43 );