Class 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 .
Implements
Inherited Members
Namespace: Amazon.CDK.CfnPropertyMixins.AWS.WAFv2
Assembly: Amazon.CDK.CfnPropertyMixins.dll
Syntax (csharp)
public class CfnWebACLPropsMixin.DefaultActionProperty : CfnWebACLPropsMixin.IDefaultActionProperty
Syntax (vb)
Public Class CfnWebACLPropsMixin.DefaultActionProperty Implements CfnWebACLPropsMixin.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.CfnPropertyMixins.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 {
CustomResponseBodyKey = "customResponseBodyKey",
ResponseCode = 123,
ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
}
};
Synopsis
Constructors
| DefaultActionProperty() | In a |
Properties
| Allow | Specifies that AWS WAF should allow requests by default. |
| Block | Specifies that AWS WAF should block requests by default. |
Constructors
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 .
public DefaultActionProperty()
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.CfnPropertyMixins.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 {
CustomResponseBodyKey = "customResponseBodyKey",
ResponseCode = 123,
ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
}
};
Properties
Allow
Specifies that AWS WAF should allow requests by default.
public object? Allow { get; set; }
Property Value
Remarks
Block
Specifies that AWS WAF should block requests by default.
public object? Block { get; set; }