@Stability(value=Stable)
public static interface CfnWebACL.DefaultActionProperty
extends software.amazon.jsii.JsiiSerializable
The default action must be a terminating action, so you can't use count.
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnWebACL.DefaultActionProperty.Builder
A builder for
CfnWebACL.DefaultActionProperty |
static class |
CfnWebACL.DefaultActionProperty.Jsii$Proxy
An implementation for
CfnWebACL.DefaultActionProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnWebACL.DefaultActionProperty.Builder |
builder() |
default Object |
getAllow()
Specifies that AWS WAF should allow requests by default.
|
default Object |
getBlock()
Specifies that AWS WAF should block requests by default.
|
@Stability(value=Stable) @Nullable default Object getAllow()
@Stability(value=Stable) @Nullable default Object getBlock()
@Stability(value=Stable) static CfnWebACL.DefaultActionProperty.Builder builder()
Copyright © 2022. All rights reserved.