Class CfnWebACLPropsMixin.RuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACLPropsMixin.RuleProperty>
- Enclosing interface:
CfnWebACLPropsMixin.RuleProperty
CfnWebACLPropsMixin.RuleProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnWebACLPropsMixin.RuleProperty.getAction()action(IResolvable action) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getAction()build()Builds the configured instance.captchaConfig(CfnWebACLPropsMixin.CaptchaConfigProperty captchaConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getCaptchaConfig()captchaConfig(IResolvable captchaConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getCaptchaConfig()challengeConfig(CfnWebACLPropsMixin.ChallengeConfigProperty challengeConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getChallengeConfig()challengeConfig(IResolvable challengeConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getChallengeConfig()Sets the value ofCfnWebACLPropsMixin.RuleProperty.getName()overrideAction(CfnWebACLPropsMixin.OverrideActionProperty overrideAction) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getOverrideAction()overrideAction(IResolvable overrideAction) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getOverrideAction()Sets the value ofCfnWebACLPropsMixin.RuleProperty.getPriority()ruleLabels(List<? extends Object> ruleLabels) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getRuleLabels()ruleLabels(IResolvable ruleLabels) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getRuleLabels()statement(CfnWebACLPropsMixin.StatementProperty statement) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getStatement()statement(IResolvable statement) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getStatement()visibilityConfig(CfnWebACLPropsMixin.VisibilityConfigProperty visibilityConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getVisibilityConfig()visibilityConfig(IResolvable visibilityConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getVisibilityConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
action
Sets the value ofCfnWebACLPropsMixin.RuleProperty.getAction()- Parameters:
action- The action that AWS WAF should take on a web request when it matches the rule's statement. Settings at the web ACL level can override the rule action setting.This is used only for rules whose statements don't reference a rule group. Rule statements that reference a rule group are
RuleGroupReferenceStatementandManagedRuleGroupStatement.You must set either this
Actionsetting or the rule'sOverrideAction, but not both:- If the rule statement doesn't reference a rule group, you must set this rule action setting and you must not set the rule's override action setting.
- If the rule statement references a rule group, you must not set this action setting, because the actions are already set on the rules inside the rule group. You must set the rule's override action setting to indicate specifically whether to override the actions that are set on the rules in the rule group.
- Returns:
this
-
action
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder action(CfnWebACLPropsMixin.RuleActionProperty action) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getAction()- Parameters:
action- The action that AWS WAF should take on a web request when it matches the rule's statement. Settings at the web ACL level can override the rule action setting.This is used only for rules whose statements don't reference a rule group. Rule statements that reference a rule group are
RuleGroupReferenceStatementandManagedRuleGroupStatement.You must set either this
Actionsetting or the rule'sOverrideAction, but not both:- If the rule statement doesn't reference a rule group, you must set this rule action setting and you must not set the rule's override action setting.
- If the rule statement references a rule group, you must not set this action setting, because the actions are already set on the rules inside the rule group. You must set the rule's override action setting to indicate specifically whether to override the actions that are set on the rules in the rule group.
- Returns:
this
-
captchaConfig
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder captchaConfig(IResolvable captchaConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getCaptchaConfig()- Parameters:
captchaConfig- Specifies how AWS WAF should handleCAPTCHAevaluations. If you don't specify this, AWS WAF uses theCAPTCHAconfiguration that's defined for the web ACL.- Returns:
this
-
captchaConfig
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder captchaConfig(CfnWebACLPropsMixin.CaptchaConfigProperty captchaConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getCaptchaConfig()- Parameters:
captchaConfig- Specifies how AWS WAF should handleCAPTCHAevaluations. If you don't specify this, AWS WAF uses theCAPTCHAconfiguration that's defined for the web ACL.- Returns:
this
-
challengeConfig
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder challengeConfig(IResolvable challengeConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getChallengeConfig()- Parameters:
challengeConfig- Specifies how AWS WAF should handleChallengeevaluations. 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 CfnWebACLPropsMixin.RuleProperty.Builder challengeConfig(CfnWebACLPropsMixin.ChallengeConfigProperty challengeConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getChallengeConfig()- Parameters:
challengeConfig- Specifies how AWS WAF should handleChallengeevaluations. If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.- Returns:
this
-
name
Sets the value ofCfnWebACLPropsMixin.RuleProperty.getName()- Parameters:
name- The name of the rule. If you change the name of aRuleafter you create it and you want the rule's metric name to reflect the change, update the metric name in the rule'sVisibilityConfigsettings. AWS WAF doesn't automatically update the metric name when you update the rule name.- Returns:
this
-
overrideAction
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder overrideAction(IResolvable overrideAction) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getOverrideAction()- Parameters:
overrideAction- The override action to apply to the rules in a rule group, instead of the individual rule action settings. This is used only for rules whose statements reference a rule group. Rule statements that reference a rule group areRuleGroupReferenceStatementandManagedRuleGroupStatement.Set the override action to none to leave the rule group rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.
You must set either this
OverrideActionsetting or theActionsetting, but not both:- If the rule statement references a rule group, you must set this override action setting and you must not set the rule's action setting.
- If the rule statement doesn't reference a rule group, you must set the rule action setting and you must not set the rule's override action setting.
- Returns:
this
-
overrideAction
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder overrideAction(CfnWebACLPropsMixin.OverrideActionProperty overrideAction) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getOverrideAction()- Parameters:
overrideAction- The override action to apply to the rules in a rule group, instead of the individual rule action settings. This is used only for rules whose statements reference a rule group. Rule statements that reference a rule group areRuleGroupReferenceStatementandManagedRuleGroupStatement.Set the override action to none to leave the rule group rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.
You must set either this
OverrideActionsetting or theActionsetting, but not both:- If the rule statement references a rule group, you must set this override action setting and you must not set the rule's action setting.
- If the rule statement doesn't reference a rule group, you must set the rule action setting and you must not set the rule's override action setting.
- Returns:
this
-
priority
Sets the value ofCfnWebACLPropsMixin.RuleProperty.getPriority()- Parameters:
priority- If you define more than oneRulein aWebACL, AWS WAF evaluates each request against theRulesin order based on the value ofPriority. AWS WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.- Returns:
this
-
ruleLabels
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder ruleLabels(IResolvable ruleLabels) Sets the value ofCfnWebACLPropsMixin.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.Any rule that isn't a rule group reference statement or managed rule group statement can add labels to matching web requests.
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,
myLabelNameornameSpace1:nameSpace2:myLabelName.- Returns:
this
-
ruleLabels
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder ruleLabels(List<? extends Object> ruleLabels) Sets the value ofCfnWebACLPropsMixin.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.Any rule that isn't a rule group reference statement or managed rule group statement can add labels to matching web requests.
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,
myLabelNameornameSpace1:nameSpace2:myLabelName.- Returns:
this
-
statement
Sets the value ofCfnWebACLPropsMixin.RuleProperty.getStatement()- Parameters:
statement- The AWS WAF processing statement for the rule, for exampleByteMatchStatementorSizeConstraintStatement.- Returns:
this
-
statement
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder statement(CfnWebACLPropsMixin.StatementProperty statement) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getStatement()- Parameters:
statement- The AWS WAF processing statement for the rule, for exampleByteMatchStatementorSizeConstraintStatement.- Returns:
this
-
visibilityConfig
@Stability(Stable) public CfnWebACLPropsMixin.RuleProperty.Builder visibilityConfig(IResolvable visibilityConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getVisibilityConfig()- Parameters:
visibilityConfig- Defines and enables Amazon CloudWatch metrics and web request sample collection. If you change the name of aRuleafter 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 CfnWebACLPropsMixin.RuleProperty.Builder visibilityConfig(CfnWebACLPropsMixin.VisibilityConfigProperty visibilityConfig) Sets the value ofCfnWebACLPropsMixin.RuleProperty.getVisibilityConfig()- Parameters:
visibilityConfig- Defines and enables Amazon CloudWatch metrics and web request sample collection. If you change the name of aRuleafter 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
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnWebACLPropsMixin.RuleProperty>- Returns:
- a new instance of
CfnWebACLPropsMixin.RuleProperty - Throws:
NullPointerException- if any required attribute was not provided
-