Class CfnRuleGroupPropsMixin.RuleActionProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.wafv2.CfnRuleGroupPropsMixin.RuleActionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleGroupPropsMixin.RuleActionProperty>
- Enclosing interface:
CfnRuleGroupPropsMixin.RuleActionProperty
@Stability(Stable)
public static final class CfnRuleGroupPropsMixin.RuleActionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRuleGroupPropsMixin.RuleActionProperty>
A builder for
CfnRuleGroupPropsMixin.RuleActionProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getAllow()Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getBlock()build()Builds the configured instance.Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getCaptcha()Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getChallenge()Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getCount()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allow
Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getAllow()- Parameters:
allow- Instructs AWS WAF to allow the web request.- Returns:
this
-
block
Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getBlock()- Parameters:
block- Instructs AWS WAF to block the web request.- Returns:
this
-
captcha
Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getCaptcha()- Parameters:
captcha- Specifies that AWS WAF should run aCAPTCHAcheck against the request:.- If the request includes a valid, unexpired
CAPTCHAtoken, AWS WAF allows the web request inspection to proceed to the next rule, similar to aCountAction. - If the request doesn't include a valid, unexpired
CAPTCHAtoken, AWS WAF discontinues the web ACL evaluation of the request and blocks it from going to its intended destination.
AWS WAF generates a response that it sends back to the client, which includes the following:
- The header
x-amzn-waf-actionwith a value ofcaptcha. - The HTTP status code
405 Method Not Allowed. - If the request contains an
Acceptheader with a value oftext/html, the response includes aCAPTCHAchallenge.
You can configure the expiration time in the
CaptchaConfigImmunityTimePropertysetting at the rule and web ACL level. The rule setting overrides the web ACL setting.This action option is available for rules. It isn't available for web ACL default actions.
- If the request includes a valid, unexpired
- Returns:
this
-
challenge
@Stability(Stable) public CfnRuleGroupPropsMixin.RuleActionProperty.Builder challenge(Object challenge) Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getChallenge()- Parameters:
challenge- Instructs AWS WAF to run aChallengecheck against the web request.- Returns:
this
-
count
Sets the value ofCfnRuleGroupPropsMixin.RuleActionProperty.getCount()- Parameters:
count- Instructs AWS WAF to count the web request and then continue evaluating the request using the remaining rules in the web ACL.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRuleGroupPropsMixin.RuleActionProperty>- Returns:
- a new instance of
CfnRuleGroupPropsMixin.RuleActionProperty - Throws:
NullPointerException- if any required attribute was not provided
-