Class CfnInsightRuleProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.CfnInsightRuleProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInsightRuleProps>
- Enclosing interface:
CfnInsightRuleProps
@Stability(Stable)
public static final class CfnInsightRuleProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInsightRuleProps>
A builder for
CfnInsightRuleProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnInsightRuleProps.getRuleBody()
Sets the value ofCfnInsightRuleProps.getRuleName()
Sets the value ofCfnInsightRuleProps.getRuleState()
Sets the value ofCfnInsightRuleProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
ruleBody
Sets the value ofCfnInsightRuleProps.getRuleBody()
- Parameters:
ruleBody
- The definition of the rule, as a JSON object. This parameter is required. For details about the syntax, see Contributor Insights Rule Syntax in the Amazon CloudWatch User Guide .- Returns:
this
-
ruleName
Sets the value ofCfnInsightRuleProps.getRuleName()
- Parameters:
ruleName
- The name of the rule. This parameter is required.- Returns:
this
-
ruleState
Sets the value ofCfnInsightRuleProps.getRuleState()
- Parameters:
ruleState
- The current state of the rule. This parameter is required. Valid values areENABLED
andDISABLED
.- Returns:
this
-
tags
Sets the value ofCfnInsightRuleProps.getTags()
- Parameters:
tags
- 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 thecloudwatch:PutInsightRule
permission.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInsightRuleProps>
- Returns:
- a new instance of
CfnInsightRuleProps
- Throws:
NullPointerException
- if any required attribute was not provided
-