Class 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
.
Inheritance
System.Object
CfnWebACL.DefaultActionProperty
Implements
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DefaultActionProperty : Object, CfnWebACL.IDefaultActionProperty
Syntax (vb)
Public Class DefaultActionProperty
Inherits Object
Implements CfnWebACL.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
Constructors
DefaultActionProperty() |
Properties
Allow | Specifies that AWS WAF should allow requests by default. |
Block | Specifies that AWS WAF should block requests by default. |
Constructors
DefaultActionProperty()
public DefaultActionProperty()
Properties
Allow
Specifies that AWS WAF should allow requests by default.
public object Allow { get; set; }
Property Value
System.Object
Remarks
Block
Specifies that AWS WAF should block requests by default.
public object Block { get; set; }
Property Value
System.Object