1import * as cloudwatch from "@distilled.cloud/aws/cloudwatch";
2import * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { InsightRuleResource } from "./binding-common.ts";
5
6type 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 */
29export interface DisableInsightRules extends Binding.Service<
30 DisableInsightRules,
31 "AWS.CloudWatch.DisableInsightRules",
32 (
33 ...rules: InsightRules
34 ) => Effect.Effect<
35 () => Effect.Effect<cloudwatch.DisableInsightRulesOutput, any>
36 >
37> {}
38
39export const DisableInsightRules = Binding.Service<DisableInsightRules>(
40 "AWS.CloudWatch.DisableInsightRules",
41);