Class CfnWebACL.BlockActionProperty
Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnWebACL.BlockActionProperty : CfnWebACL.IBlockActionProperty
Syntax (vb)
Public Class CfnWebACL.BlockActionProperty 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() | Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request. |
Properties
| CustomResponse | Defines a custom response for the web request. |
Constructors
BlockActionProperty()
Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request.
public BlockActionProperty()
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"
} }
}
};
Properties
CustomResponse
Defines a custom response for the web request.
public object? CustomResponse { get; set; }
Property Value
Remarks
For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .
Type union: either IResolvable or CfnWebACL.ICustomResponseProperty