public static interface CfnWebACL.RuleActionOverrideProperty
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();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnWebACL.RuleActionOverrideProperty.Builder
A builder for
CfnWebACL.RuleActionOverrideProperty |
static class |
CfnWebACL.RuleActionOverrideProperty.Jsii$Proxy
An implementation for
CfnWebACL.RuleActionOverrideProperty |
Modifier and Type | Method and Description |
---|---|
static CfnWebACL.RuleActionOverrideProperty.Builder |
builder() |
java.lang.Object |
getActionToUse()
The override action to use, in place of the configured action of the rule in the rule group.
|
java.lang.String |
getName()
The name of the rule to override.
|
java.lang.Object getActionToUse()
java.lang.String getName()
static CfnWebACL.RuleActionOverrideProperty.Builder builder()