interface DefaultActionProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CfnPropertyMixins.AWS.WAFv2.CfnWebACLPropsMixin.DefaultActionProperty |
Go | github.com/aws/aws-cdk-go/awscdkcfnpropertymixins/v2/awswafv2#CfnWebACLPropsMixin_DefaultActionProperty |
Java | software.amazon.awscdk.cfnpropertymixins.services.wafv2.CfnWebACLPropsMixin.DefaultActionProperty |
Python | aws_cdk.cfn_property_mixins.aws_wafv2.CfnWebACLPropsMixin.DefaultActionProperty |
TypeScript | @aws-cdk/cfn-property-mixins » aws_wafv2 » CfnWebACLPropsMixin » DefaultActionProperty |
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 { aws_wafv2 as wafv2 } from '@aws-cdk/cfn-property-mixins';
const defaultActionProperty: wafv2.CfnWebACLPropsMixin.DefaultActionProperty = {
allow: {
customRequestHandling: {
insertHeaders: [{
name: 'name',
value: 'value',
}],
},
},
block: {
customResponse: {
customResponseBodyKey: 'customResponseBodyKey',
responseCode: 123,
responseHeaders: [{
name: 'name',
value: 'value',
}],
},
},
};
Properties
| Name | Type | Description |
|---|---|---|
| allow? | IResolvable | Allow | Specifies that AWS WAF should allow requests by default. |
| block? | IResolvable | Block | Specifies that AWS WAF should block requests by default. |
allow?
Type:
IResolvable | Allow
(optional)
Specifies that AWS WAF should allow requests by default.
block?
Type:
IResolvable | Block
(optional)
Specifies that AWS WAF should block requests by default.

.NET
Go
Java
Python
TypeScript