@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, 04:45 UTC

main
ts 35 lines 1.2 KB
Raw
1 import type * as eventbridge from "@distilled.cloud/aws/eventbridge";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Rule } from "./Rule.ts";
5
6 /**
7 * Disables an EventBridge rule (`events:DisableRule`) so it stops matching
8 * events without deleting it.
9 *
10 * Bind this operation to a {@link Rule} inside a function runtime to get a
11 * callable that pauses the rule — the runtime half of a feature toggle or
12 * kill switch. Provide the `DisableRuleHttp` layer on the Function to
13 * satisfy the binding.
14 * ### Toggling Rules
15 * **Example:** Pause the Bound Rule
16 * ```typescript
17 * // init — bind the rule (provide AWS.EventBridge.DisableRuleHttp on the Function)
18 * const disableRule = yield* AWS.EventBridge.DisableRule(rule);
19 *
20 * // runtime — stop event routing until re-enabled
21 * yield* disableRule();
22 * ```
23 *
24 * @binding
25 */
26 export interface DisableRule extends Binding.Service<
27 DisableRule,
28 "AWS.EventBridge.DisableRule",
29 (
30 rule: Rule,
31 ) => Effect.Effect<
32 () => Effect.Effect<eventbridge.DisableRuleResponse, eventbridge.DisableRuleError>
33 >
34 > {}
35 export const DisableRule = Binding.Service<DisableRule>("AWS.EventBridge.DisableRule");