Class CfnWebACL.BlockActionProperty
Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request.
Inheritance
System.Object
CfnWebACL.BlockActionProperty
Implements
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class BlockActionProperty : Object, CfnWebACL.IBlockActionProperty
Syntax (vb)
Public Class BlockActionProperty
Inherits Object
Implements CfnWebACL.IBlockActionProperty
Remarks
This is used in the context of other settings, for example to specify values for a rule action or a web ACL default 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 blockActionProperty = new BlockActionProperty {
CustomResponse = new CustomResponseProperty {
ResponseCode = 123,
// the properties below are optional
CustomResponseBodyKey = "customResponseBodyKey",
ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
};
Synopsis
Constructors
BlockActionProperty() |
Properties
CustomResponse | Defines a custom response for the web request. |
Constructors
BlockActionProperty()
public BlockActionProperty()
Properties
CustomResponse
Defines a custom response for the web request.
public object CustomResponse { get; set; }
Property Value
System.Object
Remarks
For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .