GetInsightRuleReport
Source:
src/AWS/CloudWatch/GetInsightRuleReport.ts
Runtime binding for cloudwatch:GetInsightRuleReport — fetch the
top-contributor report for the bound InsightRule; the rule name
is injected automatically.
Provide CloudWatch.GetInsightRuleReportHttp on the hosting Lambda
Function to satisfy the requirement.
Reading Insight Rules
Section titled “Reading Insight Rules”// init — grants cloudwatch:GetInsightRuleReport on the ruleconst getInsightRuleReport = yield* AWS.CloudWatch.GetInsightRuleReport(rule);
// runtimeconst now = yield* Effect.sync(() => Date.now());const result = yield* getInsightRuleReport({ StartTime: new Date(now - 3_600_000), EndTime: new Date(now), Period: 300,});const contributors = result.Contributors ?? [];