CustomResponseBodyProperty Struct
The response body to use in a custom response to a web request.
This is referenced by key from CustomResponse CustomResponseBodyKey .
| Source | |
|---|---|
| Type last changed |
Example
ts
// 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',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wafv2 as wafv2
custom_response_body_property = wafv2.CfnRuleGroup.CustomResponseBodyProperty(
content="content",
content_type="contentType"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wafv2.*;
CustomResponseBodyProperty customResponseBodyProperty = CustomResponseBodyProperty.builder()
.content("content")
.contentType("contentType")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
customResponseBodyProperty := &CustomResponseBodyProperty{
Content: jsii.String("content"),
ContentType: jsii.String("contentType"),
}
Properties
The payload of the custom response.
notes
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 .
The type of content in the payload that you are defining in the `Content` string.