@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:51.252Z") @Stability(value=Stable) 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. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnInsightRule(Construct scope,
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 |
|---|---|
String |
getAttrArn()
The ARN of the Contributor Insights rule, such as `arn:aws:cloudwatch:us-west-2:123456789012:insight-rule/MyInsightRuleName` .
|
String |
getAttrRuleName()
The name of the Contributor Insights rule.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getRuleBody()
The definition of the rule, as a JSON object.
|
String |
getRuleName()
The name of the rule.
|
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 Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setRuleBody(String value)
The definition of the rule, as a JSON object.
|
void |
setRuleName(String value)
The name of the rule.
|
void |
setRuleState(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, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnInsightRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnInsightRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnInsightRule(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull public String getAttrRuleName()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull 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.
@Stability(value=Stable) @NotNull public String getRuleBody()
For details about the syntax, see Contributor Insights Rule Syntax in the Amazon CloudWatch User Guide .
@Stability(value=Stable)
public void setRuleBody(@NotNull
String value)
For details about the syntax, see Contributor Insights Rule Syntax in the Amazon CloudWatch User Guide .
@Stability(value=Stable) @NotNull public String getRuleName()
@Stability(value=Stable)
public void setRuleName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getRuleState()
Valid values are ENABLED and DISABLED .
@Stability(value=Stable)
public void setRuleState(@NotNull
String value)
Valid values are ENABLED and DISABLED .
Copyright © 2023. All rights reserved.