@Stability(value=Stable)
public static interface CfnWebACL.CaptchaActionProperty
extends software.amazon.jsii.JsiiSerializable
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.
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.*;
CaptchaActionProperty captchaActionProperty = CaptchaActionProperty.builder()
.customRequestHandling(CustomRequestHandlingProperty.builder()
.insertHeaders(List.of(CustomHTTPHeaderProperty.builder()
.name("name")
.value("value")
.build()))
.build())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnWebACL.CaptchaActionProperty.Builder
A builder for
CfnWebACL.CaptchaActionProperty |
static class |
CfnWebACL.CaptchaActionProperty.Jsii$Proxy
An implementation for
CfnWebACL.CaptchaActionProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnWebACL.CaptchaActionProperty.Builder |
builder() |
default Object |
getCustomRequestHandling()
Defines custom handling for the web request.
|
@Stability(value=Stable) @Nullable default Object getCustomRequestHandling()
For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .
@Stability(value=Stable) static CfnWebACL.CaptchaActionProperty.Builder builder()
Copyright © 2022. All rights reserved.