Skip to content

DisableInsightRules

Source: src/AWS/CloudWatch/DisableInsightRules.ts

Runtime binding for cloudwatch:DisableInsightRules — pause data collection for the bound Contributor Insights rules. Bind it to one or more InsightRule resources; the rule names are injected automatically.

Provide CloudWatch.DisableInsightRulesHttp on the hosting Lambda Function to satisfy the requirement.

// init — grants cloudwatch:DisableInsightRules on the rule
const disableInsightRules = yield* AWS.CloudWatch.DisableInsightRules(rule);
// runtime
const result = yield* disableInsightRules();
const failures = result.Failures ?? []; // empty on success