public static final class CfnRuleGroup.RuleProperty.Builder
extends java.lang.Object
CfnRuleGroup.RuleProperty
Constructor and Description |
---|
Builder() |
public CfnRuleGroup.RuleProperty.Builder name(java.lang.String name)
CfnRuleGroup.RuleProperty.getName()
name
- The name of the rule. This parameter is required.
You can't change the name of a Rule
after you create it.this
public CfnRuleGroup.RuleProperty.Builder priority(java.lang.Number priority)
CfnRuleGroup.RuleProperty.getPriority()
priority
- If you define more than one `Rule` in a `WebACL` , AWS WAF evaluates each request against the `Rules` in order based on the value of `Priority` . 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.this
public CfnRuleGroup.RuleProperty.Builder statement(IResolvable statement)
CfnRuleGroup.RuleProperty.getStatement()
statement
- The AWS WAF processing statement for the rule, for example `ByteMatchStatement` or `SizeConstraintStatement` . This parameter is required.this
public CfnRuleGroup.RuleProperty.Builder statement(CfnRuleGroup.StatementProperty statement)
CfnRuleGroup.RuleProperty.getStatement()
statement
- The AWS WAF processing statement for the rule, for example `ByteMatchStatement` or `SizeConstraintStatement` . This parameter is required.this
public CfnRuleGroup.RuleProperty.Builder visibilityConfig(IResolvable visibilityConfig)
CfnRuleGroup.RuleProperty.getVisibilityConfig()
visibilityConfig
- Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required.this
public CfnRuleGroup.RuleProperty.Builder visibilityConfig(CfnRuleGroup.VisibilityConfigProperty visibilityConfig)
CfnRuleGroup.RuleProperty.getVisibilityConfig()
visibilityConfig
- Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required.this
public CfnRuleGroup.RuleProperty.Builder action(IResolvable action)
CfnRuleGroup.RuleProperty.getAction()
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.this
public CfnRuleGroup.RuleProperty.Builder action(CfnRuleGroup.RuleActionProperty action)
CfnRuleGroup.RuleProperty.getAction()
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.this
public CfnRuleGroup.RuleProperty.Builder captchaConfig(IResolvable captchaConfig)
CfnRuleGroup.RuleProperty.getCaptchaConfig()
captchaConfig
- Specifies how AWS WAF should handle `CAPTCHA` evaluations.
If you don't specify this, AWS WAF uses the CAPTCHA
configuration that's defined for the web ACL.this
public CfnRuleGroup.RuleProperty.Builder captchaConfig(CfnRuleGroup.CaptchaConfigProperty captchaConfig)
CfnRuleGroup.RuleProperty.getCaptchaConfig()
captchaConfig
- Specifies how AWS WAF should handle `CAPTCHA` evaluations.
If you don't specify this, AWS WAF uses the CAPTCHA
configuration that's defined for the web ACL.this
public CfnRuleGroup.RuleProperty.Builder challengeConfig(IResolvable challengeConfig)
CfnRuleGroup.RuleProperty.getChallengeConfig()
challengeConfig
- Specifies how AWS WAF should handle `Challenge` evaluations.
If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.this
public CfnRuleGroup.RuleProperty.Builder challengeConfig(CfnRuleGroup.ChallengeConfigProperty challengeConfig)
CfnRuleGroup.RuleProperty.getChallengeConfig()
challengeConfig
- Specifies how AWS WAF should handle `Challenge` evaluations.
If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.this
public CfnRuleGroup.RuleProperty.Builder ruleLabels(IResolvable ruleLabels)
CfnRuleGroup.RuleProperty.getRuleLabels()
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:
aws
, waf
, managed
, rulegroup
, webacl
, regexpatternset
, or ipset
.
For example, myLabelName
or nameSpace1:nameSpace2:myLabelName
.
this
public CfnRuleGroup.RuleProperty.Builder ruleLabels(java.util.List<? extends java.lang.Object> ruleLabels)
CfnRuleGroup.RuleProperty.getRuleLabels()
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:
aws
, waf
, managed
, rulegroup
, webacl
, regexpatternset
, or ipset
.
For example, myLabelName
or nameSpace1:nameSpace2:myLabelName
.
this
public CfnRuleGroup.RuleProperty build()
CfnRuleGroup.RuleProperty
java.lang.NullPointerException
- if any required attribute was not provided