1import * as cloudwatch from "@distilled.cloud/aws/cloudwatch";
2import * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5export interface DescribeInsightRulesRequest
6 extends cloudwatch.DescribeInsightRulesInput {}
7
8/**
9 * Runtime binding for `cloudwatch:DescribeInsightRules` — list the
10 * Contributor Insights rules in the account/region.
11 *
12 * Provide `CloudWatch.DescribeInsightRulesHttp` on the hosting Lambda
13 * Function to satisfy the requirement.
14 * ### Reading Insight Rules
15 * **Example:** List Contributor Insights Rules
16 * ```typescript
17 * // init — grants cloudwatch:DescribeInsightRules
18 * const describeInsightRules = yield* AWS.CloudWatch.DescribeInsightRules();
19 *
20 * // runtime
21 * const result = yield* describeInsightRules();
22 * const names = (result.InsightRules ?? []).map((rule) => rule.Name);
23 * ```
24 *
25 * @binding
26 */
27export interface DescribeInsightRules extends Binding.Service<
28 DescribeInsightRules,
29 "AWS.CloudWatch.DescribeInsightRules",
30 () => Effect.Effect<
31 (
32 request?: DescribeInsightRulesRequest,
33 ) => Effect.Effect<
34 cloudwatch.DescribeInsightRulesOutput,
35 cloudwatch.DescribeInsightRulesError
36 >
37 >
38> {}
39
40export const DescribeInsightRules = Binding.Service<DescribeInsightRules>(
41 "AWS.CloudWatch.DescribeInsightRules",
42);