Class CfnWebACLPropsMixin.CustomResponseProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.wafv2.CfnWebACLPropsMixin.CustomResponseProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACLPropsMixin.CustomResponseProperty>
- Enclosing interface:
CfnWebACLPropsMixin.CustomResponseProperty
@Stability(Stable)
public static final class CfnWebACLPropsMixin.CustomResponseProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnWebACLPropsMixin.CustomResponseProperty>
A builder for
CfnWebACLPropsMixin.CustomResponseProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.customResponseBodyKey(String customResponseBodyKey) Sets the value ofCfnWebACLPropsMixin.CustomResponseProperty.getCustomResponseBodyKey()responseCode(Number responseCode) Sets the value ofCfnWebACLPropsMixin.CustomResponseProperty.getResponseCode()responseHeaders(List<? extends Object> responseHeaders) Sets the value ofCfnWebACLPropsMixin.CustomResponseProperty.getResponseHeaders()responseHeaders(IResolvable responseHeaders) Sets the value ofCfnWebACLPropsMixin.CustomResponseProperty.getResponseHeaders()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
customResponseBodyKey
@Stability(Stable) public CfnWebACLPropsMixin.CustomResponseProperty.Builder customResponseBodyKey(String customResponseBodyKey) Sets the value ofCfnWebACLPropsMixin.CustomResponseProperty.getCustomResponseBodyKey()- Parameters:
customResponseBodyKey- References the response body that you want AWS WAF to return to the web request client. You can define a custom response for a rule action or a default web ACL action that is set to block. To do this, you first define the response body key and value in theCustomResponseBodiessetting for theWebACLorRuleGroupwhere you want to use it. Then, in the rule action or web ACL default actionBlockActionsetting, you reference the response body using this key.- Returns:
this
-
responseCode
@Stability(Stable) public CfnWebACLPropsMixin.CustomResponseProperty.Builder responseCode(Number responseCode) Sets the value ofCfnWebACLPropsMixin.CustomResponseProperty.getResponseCode()- Parameters:
responseCode- The HTTP status code to return to the client. For a list of status codes that you can use in your custom responses, see Supported status codes for custom response in the AWS WAF Developer Guide .- Returns:
this
-
responseHeaders
@Stability(Stable) public CfnWebACLPropsMixin.CustomResponseProperty.Builder responseHeaders(IResolvable responseHeaders) Sets the value ofCfnWebACLPropsMixin.CustomResponseProperty.getResponseHeaders()- Parameters:
responseHeaders- The HTTP headers to use in the response. You can specify any header name except forcontent-type. Duplicate header names are not allowed.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
-
responseHeaders
@Stability(Stable) public CfnWebACLPropsMixin.CustomResponseProperty.Builder responseHeaders(List<? extends Object> responseHeaders) Sets the value ofCfnWebACLPropsMixin.CustomResponseProperty.getResponseHeaders()- Parameters:
responseHeaders- The HTTP headers to use in the response. You can specify any header name except forcontent-type. Duplicate header names are not allowed.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
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnWebACLPropsMixin.CustomResponseProperty>- Returns:
- a new instance of
CfnWebACLPropsMixin.CustomResponseProperty - Throws:
NullPointerException- if any required attribute was not provided
-