AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::CloudWatch::InsightRule

CfnInsightRule

Creates or updates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs log group, enabling you to find contributor data for the log events in that log group. For more information, see [Using Contributor Insights to Analyze High-Cardinality Data](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights.html) in the *Amazon CloudWatch User Guide* .

Import

import { CfnInsightRule } from 'aws-cdk-lib/aws-cloudwatch';

Or use the module namespace:

import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
// cloudwatch.CfnInsightRule

Properties

Configuration passed to the constructor as CfnInsightRuleProps.

ruleBodyRequired
string

The definition of the rule, as a JSON object. For details about the syntax, see [Contributor Insights Rule Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html) in the *Amazon CloudWatch User Guide* .

ruleNameRequired
string

The name of the rule.

ruleStateRequired
string

The current state of the rule. Valid values are `ENABLED` and `DISABLED` .

applyOnTransformedLogsOptional
boolean | IResolvable

Determines whether the rules is evaluated on transformed versions of logs. Valid values are `TRUE` and `FALSE` .

tagsOptional
CfnTag[]

A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags with a rule. Tags can help you organize and categorize your resources. For more information, see [Tagging Your Amazon CloudWatch Resources](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Tagging.html) . To be able to associate tags with a rule, you must have the `cloudwatch:TagResource` permission in addition to the `cloudwatch:PutInsightRule` permission.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon CloudWatch Cheat Sheet

Everything you need to know about Amazon CloudWatch on one page. HD quality, print-friendly.

Download Free Infographic