public static final class CfnRuleGroup.CustomResponseProperty.Builder
extends java.lang.Object
CfnRuleGroup.CustomResponseProperty
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CfnRuleGroup.CustomResponseProperty |
build()
Builds the configured instance.
|
CfnRuleGroup.CustomResponseProperty.Builder |
customResponseBodyKey(java.lang.String customResponseBodyKey)
Sets the value of
CfnRuleGroup.CustomResponseProperty.getCustomResponseBodyKey() |
CfnRuleGroup.CustomResponseProperty.Builder |
responseCode(java.lang.Number responseCode)
Sets the value of
CfnRuleGroup.CustomResponseProperty.getResponseCode() |
CfnRuleGroup.CustomResponseProperty.Builder |
responseHeaders(IResolvable responseHeaders)
Sets the value of
CfnRuleGroup.CustomResponseProperty.getResponseHeaders() |
CfnRuleGroup.CustomResponseProperty.Builder |
responseHeaders(java.util.List<? extends java.lang.Object> responseHeaders)
Sets the value of
CfnRuleGroup.CustomResponseProperty.getResponseHeaders() |
public CfnRuleGroup.CustomResponseProperty.Builder responseCode(java.lang.Number responseCode)
CfnRuleGroup.CustomResponseProperty.getResponseCode()
responseCode
- The HTTP status code to return to the client. This parameter is required.
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 .this
public CfnRuleGroup.CustomResponseProperty.Builder customResponseBodyKey(java.lang.String customResponseBodyKey)
CfnRuleGroup.CustomResponseProperty.getCustomResponseBodyKey()
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 the CustomResponseBodies
setting for the WebACL
or RuleGroup
where you want to use it. Then, in the rule action or web ACL default action BlockAction
setting, you reference the response body using this key.this
public CfnRuleGroup.CustomResponseProperty.Builder responseHeaders(IResolvable responseHeaders)
CfnRuleGroup.CustomResponseProperty.getResponseHeaders()
responseHeaders
- The HTTP headers to use in the response. 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 .this
public CfnRuleGroup.CustomResponseProperty.Builder responseHeaders(java.util.List<? extends java.lang.Object> responseHeaders)
CfnRuleGroup.CustomResponseProperty.getResponseHeaders()
responseHeaders
- The HTTP headers to use in the response. 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 .this
public CfnRuleGroup.CustomResponseProperty build()
CfnRuleGroup.CustomResponseProperty
java.lang.NullPointerException
- if any required attribute was not provided