aws-cdk-lib.aws_cloudwatch.CfnInsightRuleProps

interface CfnInsightRuleProps

LanguageType name
.NETAmazon.CDK.AWS.CloudWatch.CfnInsightRuleProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#CfnInsightRuleProps
Javasoftware.amazon.awscdk.services.cloudwatch.CfnInsightRuleProps
Pythonaws_cdk.aws_cloudwatch.CfnInsightRuleProps
TypeScript aws-cdk-lib » aws_cloudwatch » CfnInsightRuleProps

Properties for defining a CfnInsightRule.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const cfnInsightRuleProps: cloudwatch.CfnInsightRuleProps = {
  ruleBody: 'ruleBody',
  ruleName: 'ruleName',
  ruleState: 'ruleState',

  // the properties below are optional
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
ruleBodystringThe definition of the rule, as a JSON object.
ruleNamestringThe name of the rule.
ruleStatestringThe current state of the rule.
tags?IResolvable | IResolvable | CfnTag[]A list of key-value pairs to associate with the Contributor Insights rule.

ruleBody

Type: string

The definition of the rule, as a JSON object.

For details about the syntax, see Contributor Insights Rule Syntax in the Amazon CloudWatch User Guide .


ruleName

Type: string

The name of the rule.


ruleState

Type: string

The current state of the rule.

Valid values are ENABLED and DISABLED .


tags?

Type: IResolvable | IResolvable | CfnTag[] (optional)

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 .

To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission in addition to the cloudwatch:PutInsightRule permission.