aws-cdk-lib.aws_wafv2.CfnWebACL.CustomResponseBodyProperty

interface CustomResponseBodyProperty

LanguageType name
.NETAmazon.CDK.AWS.WAFv2.CfnWebACL.CustomResponseBodyProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awswafv2#CfnWebACL_CustomResponseBodyProperty
Javasoftware.amazon.awscdk.services.wafv2.CfnWebACL.CustomResponseBodyProperty
Pythonaws_cdk.aws_wafv2.CfnWebACL.CustomResponseBodyProperty
TypeScript aws-cdk-lib » aws_wafv2 » CfnWebACL » 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.CfnWebACL.CustomResponseBodyProperty = {
  content: 'content',
  contentType: 'contentType',
};

Properties

NameTypeDescription
contentstringThe payload of the custom response.
contentTypestringThe 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.