Interface CfnWebACL.DefaultActionProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnWebACL.DefaultActionProperty.Jsii$Proxy
Enclosing class:
CfnWebACL

@Stability(Stable) public static interface CfnWebACL.DefaultActionProperty extends software.amazon.jsii.JsiiSerializable
In a WebACL , this is the action that you want AWS WAF to perform when a web request doesn't match any of the rules in the WebACL .

The default action must be a terminating action.

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.*;
 DefaultActionProperty defaultActionProperty = DefaultActionProperty.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())
         .build();