@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:40.984Z") public class CfnInsightRule extends CfnResource implements IInspectable
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 in the Amazon CloudWatch User Guide .
Example:
// 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.*; CfnInsightRule cfnInsightRule = CfnInsightRule.Builder.create(this, "MyCfnInsightRule") .ruleBody("ruleBody") .ruleName("ruleName") .ruleState("ruleState") // the properties below are optional .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnInsightRule.Builder
A fluent builder for
CfnInsightRule . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnInsightRule(Construct scope,
java.lang.String id,
CfnInsightRuleProps props)
Create a new `AWS::CloudWatch::InsightRule`.
|
protected |
CfnInsightRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnInsightRule(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The ARN of the Contributor Insights rule, such as `arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName` .
|
java.lang.String |
getAttrRuleName()
The name of the Contributor Insights rule.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getRuleBody()
The definition of the rule, as a JSON object.
|
java.lang.String |
getRuleName()
The name of the rule.
|
java.lang.String |
getRuleState()
The current state of the rule.
|
TagManager |
getTags()
A list of key-value pairs to associate with the Contributor Insights rule.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setRuleBody(java.lang.String value)
The definition of the rule, as a JSON object.
|
void |
setRuleName(java.lang.String value)
The name of the rule.
|
void |
setRuleState(java.lang.String value)
The current state of the rule.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnInsightRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInsightRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnInsightRule(Construct scope, java.lang.String id, CfnInsightRuleProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrRuleName()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
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.
public java.lang.String getRuleBody()
For details about the syntax, see Contributor Insights Rule Syntax in the Amazon CloudWatch User Guide .
public void setRuleBody(java.lang.String value)
For details about the syntax, see Contributor Insights Rule Syntax in the Amazon CloudWatch User Guide .
public java.lang.String getRuleName()
public void setRuleName(java.lang.String value)
public java.lang.String getRuleState()
Valid values are ENABLED
and DISABLED
.
public void setRuleState(java.lang.String value)
Valid values are ENABLED
and DISABLED
.