@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 39 lines 1.4 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:EnableInsightRules` — resume data
10 * collection for the bound Contributor Insights rules after they were
11 * paused with {@link DisableInsightRules}. Bind it to one or more
12 * {@link InsightRule} resources; the rule names are injected automatically.
13 *
14 * Provide `CloudWatch.EnableInsightRulesHttp` on the hosting Lambda
15 * Function to satisfy the requirement.
16 * ### Managing Insight Rules
17 * **Example:** Resume a Contributor Insights Rule
18 * ```typescript
19 * // init — grants cloudwatch:EnableInsightRules on the rule
20 * const enableInsightRules = yield* AWS.CloudWatch.EnableInsightRules(rule);
21 *
22 * // runtime
23 * const result = yield* enableInsightRules();
24 * const failures = result.Failures ?? []; // empty on success
25 * ```
26 *
27 * @binding
28 */
29 export interface EnableInsightRules extends Binding.Service<
30 EnableInsightRules,
31 "AWS.CloudWatch.EnableInsightRules",
32 (
33 ...rules: InsightRules
34 ) => Effect.Effect<() => Effect.Effect<cloudwatch.EnableInsightRulesOutput, any>>
35 > {}
36
37 export const EnableInsightRules = Binding.Service<EnableInsightRules>(
38 "AWS.CloudWatch.EnableInsightRules",
39 );