Class CfnWebACL.CustomResponseBodyProperty.Builder
java.lang.Object
software.amazon.awscdk.services.wafv2.CfnWebACL.CustomResponseBodyProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACL.CustomResponseBodyProperty>
- Enclosing interface:
- CfnWebACL.CustomResponseBodyProperty
@Stability(Stable)
public static final class CfnWebACL.CustomResponseBodyProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnWebACL.CustomResponseBodyProperty>
A builder for
CfnWebACL.CustomResponseBodyProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnWebACL.CustomResponseBodyProperty.getContent()
contentType
(String contentType) Sets the value ofCfnWebACL.CustomResponseBodyProperty.getContentType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
content
Sets the value ofCfnWebACL.CustomResponseBodyProperty.getContent()
- Parameters:
content
- The payload of the custom response. This parameter is required. You can use JSON escape strings in JSON content. To do this, you must specify JSON content in theContentType
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 .
- Returns:
this
-
contentType
@Stability(Stable) public CfnWebACL.CustomResponseBodyProperty.Builder contentType(String contentType) Sets the value ofCfnWebACL.CustomResponseBodyProperty.getContentType()
- Parameters:
contentType
- The type of content in the payload that you are defining in theContent
string. This parameter is required.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnWebACL.CustomResponseBodyProperty>
- Returns:
- a new instance of
CfnWebACL.CustomResponseBodyProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-