interface DefaultActionProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.WAFv2.CfnWebACL.DefaultActionProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awswafv2#CfnWebACL_DefaultActionProperty |
![]() | software.amazon.awscdk.services.wafv2.CfnWebACL.DefaultActionProperty |
![]() | aws_cdk.aws_wafv2.CfnWebACL.DefaultActionProperty |
![]() | aws-cdk-lib » aws_wafv2 » CfnWebACL » 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-lib';
const defaultActionProperty: wafv2.CfnWebACL.DefaultActionProperty = {
allow: {
customRequestHandling: {
insertHeaders: [{
name: 'name',
value: 'value',
}],
},
},
block: {
customResponse: {
responseCode: 123,
// the properties below are optional
customResponseBodyKey: 'customResponseBodyKey',
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.