Class CfnRuleGroup.RuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleGroup.RuleProperty>
- Enclosing interface:
CfnRuleGroup.RuleProperty
CfnRuleGroup.RuleProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaction
(IResolvable action) Sets the value ofCfnRuleGroup.RuleProperty.getAction()
Sets the value ofCfnRuleGroup.RuleProperty.getAction()
build()
Builds the configured instance.captchaConfig
(IResolvable captchaConfig) Sets the value ofCfnRuleGroup.RuleProperty.getCaptchaConfig()
captchaConfig
(CfnRuleGroup.CaptchaConfigProperty captchaConfig) Sets the value ofCfnRuleGroup.RuleProperty.getCaptchaConfig()
challengeConfig
(IResolvable challengeConfig) Sets the value ofCfnRuleGroup.RuleProperty.getChallengeConfig()
challengeConfig
(CfnRuleGroup.ChallengeConfigProperty challengeConfig) Sets the value ofCfnRuleGroup.RuleProperty.getChallengeConfig()
Sets the value ofCfnRuleGroup.RuleProperty.getName()
Sets the value ofCfnRuleGroup.RuleProperty.getPriority()
ruleLabels
(List<? extends Object> ruleLabels) Sets the value ofCfnRuleGroup.RuleProperty.getRuleLabels()
ruleLabels
(IResolvable ruleLabels) Sets the value ofCfnRuleGroup.RuleProperty.getRuleLabels()
statement
(IResolvable statement) Sets the value ofCfnRuleGroup.RuleProperty.getStatement()
statement
(CfnRuleGroup.StatementProperty statement) Sets the value ofCfnRuleGroup.RuleProperty.getStatement()
visibilityConfig
(IResolvable visibilityConfig) Sets the value ofCfnRuleGroup.RuleProperty.getVisibilityConfig()
visibilityConfig
(CfnRuleGroup.VisibilityConfigProperty visibilityConfig) Sets the value ofCfnRuleGroup.RuleProperty.getVisibilityConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the value ofCfnRuleGroup.RuleProperty.getName()
- Parameters:
name
- The name of the rule. This parameter is required. If you change the name of aRule
after you create it and you want the rule's metric name to reflect the change, update the metric name in the rule'sVisibilityConfig
settings. AWS WAF doesn't automatically update the metric name when you update the rule name.- Returns:
this
-
priority
Sets the value ofCfnRuleGroup.RuleProperty.getPriority()
- Parameters:
priority
- If you define more than oneRule
in aWebACL
, AWS WAF evaluates each request against theRules
in order based on the value ofPriority
. This parameter is required. AWS WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.- Returns:
this
-
statement
Sets the value ofCfnRuleGroup.RuleProperty.getStatement()
- Parameters:
statement
- The AWS WAF processing statement for the rule, for exampleByteMatchStatement
orSizeConstraintStatement
. This parameter is required.- Returns:
this
-
statement
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder statement(CfnRuleGroup.StatementProperty statement) Sets the value ofCfnRuleGroup.RuleProperty.getStatement()
- Parameters:
statement
- The AWS WAF processing statement for the rule, for exampleByteMatchStatement
orSizeConstraintStatement
. This parameter is required.- Returns:
this
-
visibilityConfig
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder visibilityConfig(IResolvable visibilityConfig) Sets the value ofCfnRuleGroup.RuleProperty.getVisibilityConfig()
- Parameters:
visibilityConfig
- Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required. If you change the name of aRule
after you create it and you want the rule's metric name to reflect the change, update the metric name as well. AWS WAF doesn't automatically update the metric name.- Returns:
this
-
visibilityConfig
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder visibilityConfig(CfnRuleGroup.VisibilityConfigProperty visibilityConfig) Sets the value ofCfnRuleGroup.RuleProperty.getVisibilityConfig()
- Parameters:
visibilityConfig
- Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required. If you change the name of aRule
after you create it and you want the rule's metric name to reflect the change, update the metric name as well. AWS WAF doesn't automatically update the metric name.- Returns:
this
-
action
Sets the value ofCfnRuleGroup.RuleProperty.getAction()
- Parameters:
action
- The action that AWS WAF should take on a web request when it matches the rule statement. Settings at the web ACL level can override the rule action setting.- Returns:
this
-
action
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder action(CfnRuleGroup.RuleActionProperty action) Sets the value ofCfnRuleGroup.RuleProperty.getAction()
- Parameters:
action
- The action that AWS WAF should take on a web request when it matches the rule statement. Settings at the web ACL level can override the rule action setting.- Returns:
this
-
captchaConfig
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder captchaConfig(IResolvable captchaConfig) Sets the value ofCfnRuleGroup.RuleProperty.getCaptchaConfig()
- Parameters:
captchaConfig
- Specifies how AWS WAF should handleCAPTCHA
evaluations. If you don't specify this, AWS WAF uses theCAPTCHA
configuration that's defined for the web ACL.- Returns:
this
-
captchaConfig
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder captchaConfig(CfnRuleGroup.CaptchaConfigProperty captchaConfig) Sets the value ofCfnRuleGroup.RuleProperty.getCaptchaConfig()
- Parameters:
captchaConfig
- Specifies how AWS WAF should handleCAPTCHA
evaluations. If you don't specify this, AWS WAF uses theCAPTCHA
configuration that's defined for the web ACL.- Returns:
this
-
challengeConfig
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder challengeConfig(IResolvable challengeConfig) Sets the value ofCfnRuleGroup.RuleProperty.getChallengeConfig()
- Parameters:
challengeConfig
- Specifies how AWS WAF should handleChallenge
evaluations. If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.- Returns:
this
-
challengeConfig
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder challengeConfig(CfnRuleGroup.ChallengeConfigProperty challengeConfig) Sets the value ofCfnRuleGroup.RuleProperty.getChallengeConfig()
- Parameters:
challengeConfig
- Specifies how AWS WAF should handleChallenge
evaluations. If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.- Returns:
this
-
ruleLabels
Sets the value ofCfnRuleGroup.RuleProperty.getRuleLabels()
- Parameters:
ruleLabels
- Labels to apply to web requests that match the rule match statement. AWS WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.Rules that run after this rule in the web ACL can match against these labels using a
LabelMatchStatement
.For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:
- Separate each component of the label with a colon.
- Each namespace or name can have up to 128 characters.
- You can specify up to 5 namespaces in a label.
- Don't use the following reserved words in your label specification:
aws
,waf
,managed
,rulegroup
,webacl
,regexpatternset
, oripset
.
For example,
myLabelName
ornameSpace1:nameSpace2:myLabelName
.- Returns:
this
-
ruleLabels
@Stability(Stable) public CfnRuleGroup.RuleProperty.Builder ruleLabels(List<? extends Object> ruleLabels) Sets the value ofCfnRuleGroup.RuleProperty.getRuleLabels()
- Parameters:
ruleLabels
- Labels to apply to web requests that match the rule match statement. AWS WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.Rules that run after this rule in the web ACL can match against these labels using a
LabelMatchStatement
.For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:
- Separate each component of the label with a colon.
- Each namespace or name can have up to 128 characters.
- You can specify up to 5 namespaces in a label.
- Don't use the following reserved words in your label specification:
aws
,waf
,managed
,rulegroup
,webacl
,regexpatternset
, oripset
.
For example,
myLabelName
ornameSpace1:nameSpace2:myLabelName
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRuleGroup.RuleProperty>
- Returns:
- a new instance of
CfnRuleGroup.RuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-