@Stability(value=Stable)
public static interface CfnWebACL.RuleActionProperty
extends software.amazon.jsii.JsiiSerializable
Settings at the web ACL level can override the rule action setting.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wafv2.*;
RuleActionProperty ruleActionProperty = RuleActionProperty.builder()
.allow(AllowActionProperty.builder()
.customRequestHandling(CustomRequestHandlingProperty.builder()
.insertHeaders(List.of(CustomHTTPHeaderProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.build())
.block(BlockActionProperty.builder()
.customResponse(CustomResponseProperty.builder()
.responseCode(123)
// the properties below are optional
.customResponseBodyKey("customResponseBodyKey")
.responseHeaders(List.of(CustomHTTPHeaderProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.build())
.captcha(CaptchaActionProperty.builder()
.customRequestHandling(CustomRequestHandlingProperty.builder()
.insertHeaders(List.of(CustomHTTPHeaderProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.build())
.count(CountActionProperty.builder()
.customRequestHandling(CustomRequestHandlingProperty.builder()
.insertHeaders(List.of(CustomHTTPHeaderProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.build())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnWebACL.RuleActionProperty.Builder
A builder for
CfnWebACL.RuleActionProperty |
static class |
CfnWebACL.RuleActionProperty.Jsii$Proxy
An implementation for
CfnWebACL.RuleActionProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnWebACL.RuleActionProperty.Builder |
builder() |
default Object |
getAllow()
Instructs AWS WAF to allow the web request.
|
default Object |
getBlock()
Instructs AWS WAF to block the web request.
|
default Object |
getCaptcha()
Specifies that AWS WAF should run a `CAPTCHA` check against the request:.
|
default Object |
getCount()
Instructs AWS WAF to count the web request and allow it.
|
@Stability(value=Stable) @Nullable default Object getAllow()
@Stability(value=Stable) @Nullable default Object getBlock()
@Stability(value=Stable) @Nullable default Object getCaptcha()
CAPTCHA token, AWS WAF allows the web request inspection to proceed to the next rule, similar to a CountAction .CAPTCHA token, 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:
x-amzn-waf-action with a value of captcha .405 Method Not Allowed .Accept header with a value of text/html , the response includes a CAPTCHA challenge.
You can configure the expiration time in the CaptchaConfig ImmunityTimeProperty setting 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.
@Stability(value=Stable) @Nullable default Object getCount()
@Stability(value=Stable) static CfnWebACL.RuleActionProperty.Builder builder()
Copyright © 2022. All rights reserved.