Class CfnRuleGroup.CustomResponseBodyProperty
The response body to use in a custom response to a web request.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRuleGroup.CustomResponseBodyProperty : CfnRuleGroup.ICustomResponseBodyProperty
Syntax (vb)
Public Class CfnRuleGroup.CustomResponseBodyProperty Implements CfnRuleGroup.ICustomResponseBodyProperty
Remarks
This is referenced by key from CustomResponse CustomResponseBodyKey .
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 customResponseBodyProperty = new CustomResponseBodyProperty {
Content = "content",
ContentType = "contentType"
};
Synopsis
Constructors
| CustomResponseBodyProperty() | The response body to use in a custom response to a web request. |
Properties
| Content | The payload of the custom response. |
| ContentType | The type of content in the payload that you are defining in the |
Constructors
CustomResponseBodyProperty()
The response body to use in a custom response to a web request.
public CustomResponseBodyProperty()
Remarks
This is referenced by key from CustomResponse CustomResponseBodyKey .
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 customResponseBodyProperty = new CustomResponseBodyProperty {
Content = "content",
ContentType = "contentType"
};
Properties
Content
The payload of the custom response.
public string Content { get; set; }
Property Value
Remarks
You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType setting.
For information about the limits on count and size for custom request and response settings, see AWS WAF quotas in the AWS WAF Developer Guide .
ContentType
The type of content in the payload that you are defining in the Content string.
public string ContentType { get; set; }