CfnInsightRuleProps Struct
Properties for defining a CfnInsightRule.
| Source | |
|---|---|
| Type last changed |
Example
ts
// 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
applyOnTransformedLogs: false,
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch
cfn_insight_rule_props = cloudwatch.CfnInsightRuleProps(
rule_body="ruleBody",
rule_name="ruleName",
rule_state="ruleState",
# the properties below are optional
apply_on_transformed_logs=False,
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;
CfnInsightRuleProps cfnInsightRuleProps = CfnInsightRuleProps.builder()
.ruleBody("ruleBody")
.ruleName("ruleName")
.ruleState("ruleState")
// the properties below are optional
.applyOnTransformedLogs(false)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;
var cfnInsightRuleProps = new CfnInsightRuleProps {
RuleBody = "ruleBody",
RuleName = "ruleName",
RuleState = "ruleState",
// the properties below are optional
ApplyOnTransformedLogs = false,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnInsightRuleProps := &CfnInsightRuleProps{
RuleBody: jsii.String("ruleBody"),
RuleName: jsii.String("ruleName"),
RuleState: jsii.String("ruleState"),
// the properties below are optional
ApplyOnTransformedLogs: jsii.Boolean(false),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
applyOnTransformedLogsoptionalboolean | IResolvableapply_on_transformed_logsoptionaltyping.Union[bool, IResolvable]applyOnTransformedLogsoptionalBooleanApplyOnTransformedLogsoptionalboolApplyOnTransformedLogsoptionalinterface{} = false #Determines whether the rules is evaluated on transformed versions of logs.
Valid values are TRUE and FALSE .
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 .
The name of the rule.
The current state of the rule.
Valid values are ENABLED and DISABLED .
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #A list of key-value pairs to associate with the Contributor Insights rule.
notes
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.