Interface CfnWebACL.IDefaultActionProperty
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
.
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IDefaultActionProperty
Syntax (vb)
Public Interface IDefaultActionProperty
Remarks
The default action must be a terminating action.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAFv2;
var defaultActionProperty = new DefaultActionProperty {
Allow = new AllowActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Block = new BlockActionProperty {
CustomResponse = new CustomResponseProperty {
ResponseCode = 123,
// the properties below are optional
CustomResponseBodyKey = "customResponseBodyKey",
ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
}
};
Synopsis
Properties
Allow | Specifies that AWS WAF should allow requests by default. |
Block | Specifies that AWS WAF should block requests by default. |
Properties
Allow
Specifies that AWS WAF should allow requests by default.
virtual object Allow { get; }
Property Value
System.Object
Remarks
Block
Specifies that AWS WAF should block requests by default.
virtual object Block { get; }
Property Value
System.Object