Class CfnWebACLPropsMixin.RuleActionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACLPropsMixin.RuleActionProperty>
- Enclosing interface:
CfnWebACLPropsMixin.RuleActionProperty
CfnWebACLPropsMixin.RuleActionProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnWebACLPropsMixin.RuleActionProperty.getAllow()allow(IResolvable allow) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getAllow()Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getBlock()block(IResolvable block) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getBlock()build()Builds the configured instance.Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getCaptcha()captcha(IResolvable captcha) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getCaptcha()Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getChallenge()challenge(IResolvable challenge) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getChallenge()Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getCount()count(IResolvable count) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getCount()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allow
Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getAllow()- Parameters:
allow- Instructs AWS WAF to allow the web request.- Returns:
this
-
allow
@Stability(Stable) public CfnWebACLPropsMixin.RuleActionProperty.Builder allow(CfnWebACLPropsMixin.AllowActionProperty allow) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getAllow()- Parameters:
allow- Instructs AWS WAF to allow the web request.- Returns:
this
-
block
Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getBlock()- Parameters:
block- Instructs AWS WAF to block the web request.- Returns:
this
-
block
@Stability(Stable) public CfnWebACLPropsMixin.RuleActionProperty.Builder block(CfnWebACLPropsMixin.BlockActionProperty block) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getBlock()- Parameters:
block- Instructs AWS WAF to block the web request.- Returns:
this
-
captcha
@Stability(Stable) public CfnWebACLPropsMixin.RuleActionProperty.Builder captcha(IResolvable captcha) Sets the value ofCfnWebACLPropsMixin.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
-
captcha
@Stability(Stable) public CfnWebACLPropsMixin.RuleActionProperty.Builder captcha(CfnWebACLPropsMixin.CaptchaActionProperty captcha) Sets the value ofCfnWebACLPropsMixin.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 CfnWebACLPropsMixin.RuleActionProperty.Builder challenge(IResolvable challenge) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getChallenge()- Parameters:
challenge- Instructs AWS WAF to run aChallengecheck against the web request.- Returns:
this
-
challenge
@Stability(Stable) public CfnWebACLPropsMixin.RuleActionProperty.Builder challenge(CfnWebACLPropsMixin.ChallengeActionProperty challenge) Sets the value ofCfnWebACLPropsMixin.RuleActionProperty.getChallenge()- Parameters:
challenge- Instructs AWS WAF to run aChallengecheck against the web request.- Returns:
this
-
count
Sets the value ofCfnWebACLPropsMixin.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
-
count
@Stability(Stable) public CfnWebACLPropsMixin.RuleActionProperty.Builder count(CfnWebACLPropsMixin.CountActionProperty count) Sets the value ofCfnWebACLPropsMixin.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<CfnWebACLPropsMixin.RuleActionProperty>- Returns:
- a new instance of
CfnWebACLPropsMixin.RuleActionProperty - Throws:
NullPointerException- if any required attribute was not provided
-