@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 39 lines 1.36 KB
Raw
1 import * as cloudwatch from "@distilled.cloud/aws/cloudwatch";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { InsightRuleResource } from "./binding-common.ts";
5
6 type InsightRules = [InsightRuleResource, ...InsightRuleResource[]];
7
8 /**
9 * Runtime binding for `cloudwatch:DisableInsightRules` — pause data
10 * collection for the bound Contributor Insights rules. Bind it to one or
11 * more {@link InsightRule} resources; the rule names are injected
12 * automatically.
13 *
14 * Provide `CloudWatch.DisableInsightRulesHttp` on the hosting Lambda
15 * Function to satisfy the requirement.
16 * ### Managing Insight Rules
17 * **Example:** Pause a Contributor Insights Rule
18 * ```typescript
19 * // init — grants cloudwatch:DisableInsightRules on the rule
20 * const disableInsightRules = yield* AWS.CloudWatch.DisableInsightRules(rule);
21 *
22 * // runtime
23 * const result = yield* disableInsightRules();
24 * const failures = result.Failures ?? []; // empty on success
25 * ```
26 *
27 * @binding
28 */
29 export interface DisableInsightRules extends Binding.Service<
30 DisableInsightRules,
31 "AWS.CloudWatch.DisableInsightRules",
32 (
33 ...rules: InsightRules
34 ) => Effect.Effect<() => Effect.Effect<cloudwatch.DisableInsightRulesOutput, any>>
35 > {}
36
37 export const DisableInsightRules = Binding.Service<DisableInsightRules>(
38 "AWS.CloudWatch.DisableInsightRules",
39 );