Interface AwsWafv2CustomResponseDetails.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<AwsWafv2CustomResponseDetails.Builder,
,AwsWafv2CustomResponseDetails> SdkBuilder<AwsWafv2CustomResponseDetails.Builder,
,AwsWafv2CustomResponseDetails> SdkPojo
- Enclosing class:
AwsWafv2CustomResponseDetails
public static interface AwsWafv2CustomResponseDetails.Builder
extends SdkPojo, CopyableBuilder<AwsWafv2CustomResponseDetails.Builder,AwsWafv2CustomResponseDetails>
-
Method Summary
Modifier and TypeMethodDescriptioncustomResponseBodyKey
(String customResponseBodyKey) References the response body that you want WAF to return to the web request client.responseCode
(Integer responseCode) The HTTP status code to return to the client.responseHeaders
(Collection<AwsWafv2CustomHttpHeader> responseHeaders) The HTTP headers to use in the response.responseHeaders
(Consumer<AwsWafv2CustomHttpHeader.Builder>... responseHeaders) The HTTP headers to use in the response.responseHeaders
(AwsWafv2CustomHttpHeader... responseHeaders) The HTTP headers to use in the response.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- 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 WAF Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseHeaders
AwsWafv2CustomResponseDetails.Builder responseHeaders(Collection<AwsWafv2CustomHttpHeader> responseHeaders) The HTTP headers to use in the response.
- Parameters:
responseHeaders
- The HTTP headers to use in the response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseHeaders
The HTTP headers to use in the response.
- Parameters:
responseHeaders
- The HTTP headers to use in the response.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
responseHeaders
AwsWafv2CustomResponseDetails.Builder responseHeaders(Consumer<AwsWafv2CustomHttpHeader.Builder>... responseHeaders) The HTTP headers to use in the response.
This is a convenience method that creates an instance of theAwsWafv2CustomHttpHeader.Builder
avoiding the need to create one manually viaAwsWafv2CustomHttpHeader.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toresponseHeaders(List<AwsWafv2CustomHttpHeader>)
.- Parameters:
responseHeaders
- a consumer that will call methods onAwsWafv2CustomHttpHeader.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-