public static interface CustomResponse.Builder extends SdkPojo, CopyableBuilder<CustomResponse.Builder,CustomResponse>
| Modifier and Type | Method and Description |
|---|---|
CustomResponse.Builder |
customResponseBodyKey(String customResponseBodyKey)
References the response body that you want WAF to return to the web request client.
|
CustomResponse.Builder |
responseCode(Integer responseCode)
The HTTP status code to return to the client.
|
CustomResponse.Builder |
responseHeaders(Collection<CustomHTTPHeader> responseHeaders)
The HTTP headers to use in the response.
|
CustomResponse.Builder |
responseHeaders(Consumer<CustomHTTPHeader.Builder>... responseHeaders)
The HTTP headers to use in the response.
|
CustomResponse.Builder |
responseHeaders(CustomHTTPHeader... responseHeaders)
The HTTP headers to use in the response.
|
equalsBySdkFields, sdkFieldscopyapplyMutation, buildCustomResponse.Builder responseCode(Integer 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 WAF Developer Guide.
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 WAF Developer Guide.
CustomResponse.Builder customResponseBodyKey(String customResponseBodyKey)
References the response body that you want 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.
customResponseBodyKey - References the response body that you want 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.CustomResponse.Builder responseHeaders(Collection<CustomHTTPHeader> responseHeaders)
The HTTP headers to use in the response. You can specify any header name except for content-type
. Duplicate header names are not allowed.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
responseHeaders - The HTTP headers to use in the response. You can specify any header name except for
content-type. Duplicate header names are not allowed.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
CustomResponse.Builder responseHeaders(CustomHTTPHeader... responseHeaders)
The HTTP headers to use in the response. You can specify any header name except for content-type
. Duplicate header names are not allowed.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
responseHeaders - The HTTP headers to use in the response. You can specify any header name except for
content-type. Duplicate header names are not allowed.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
CustomResponse.Builder responseHeaders(Consumer<CustomHTTPHeader.Builder>... responseHeaders)
The HTTP headers to use in the response. You can specify any header name except for content-type
. Duplicate header names are not allowed.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
This is a convenience method that creates an instance of theCustomHTTPHeader.Builder avoiding the need to create one
manually via CustomHTTPHeader.builder().
When the Consumer completes,
SdkBuilder.build() is called immediately
and its result is passed to #responseHeaders(List.
responseHeaders - a consumer that will call methods on
CustomHTTPHeader.Builder#responseHeaders(java.util.Collection) Copyright © 2023. All rights reserved.