interface CustomResponseBodyProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.WAFv2.CfnRuleGroup.CustomResponseBodyProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awswafv2#CfnRuleGroup_CustomResponseBodyProperty |
Java | software.amazon.awscdk.services.wafv2.CfnRuleGroup.CustomResponseBodyProperty |
Python | aws_cdk.aws_wafv2.CfnRuleGroup.CustomResponseBodyProperty |
TypeScript | aws-cdk-lib » aws_wafv2 » CfnRuleGroup » CustomResponseBodyProperty |
The response body to use in a custom response to a web request.
This is referenced by key from CustomResponse
CustomResponseBodyKey
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wafv2 as wafv2 } from 'aws-cdk-lib';
const customResponseBodyProperty: wafv2.CfnRuleGroup.CustomResponseBodyProperty = {
content: 'content',
contentType: 'contentType',
};
Properties
Name | Type | Description |
---|---|---|
content | string | The payload of the custom response. |
content | string | The type of content in the payload that you are defining in the Content string. |
content
Type:
string
The payload of the custom response.
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
Type:
string
The type of content in the payload that you are defining in the Content
string.