Interface CfnWebACL.RuleActionOverrideProperty

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

@Stability(Stable) public static interface CfnWebACL.RuleActionOverrideProperty extends software.amazon.jsii.JsiiSerializable
Action setting to use in the place of a rule action that is configured inside the rule group.

You specify one override for each rule whose action you want to change.

You can use overrides for testing, for example you can override all of rule actions to Count and then monitor the resulting count metrics to understand how the rule group would handle your web traffic. You can also permanently override some or all actions, to modify how the rule group manages your web traffic.

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.*;
 RuleActionOverrideProperty ruleActionOverrideProperty = RuleActionOverrideProperty.builder()
         .actionToUse(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())
                 .challenge(ChallengeActionProperty.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())
         .name("name")
         .build();