@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AwsWafv2CustomResponseDetails extends Object implements Serializable, Cloneable, StructuredPojo
A custom response to send to the client. You can define a custom response for rule actions and default web ACL actions that are set to block.
Constructor and Description |
---|
AwsWafv2CustomResponseDetails() |
Modifier and Type | Method and Description |
---|---|
AwsWafv2CustomResponseDetails |
clone() |
boolean |
equals(Object obj) |
String |
getCustomResponseBodyKey()
References the response body that you want WAF to return to the web request client.
|
Integer |
getResponseCode()
The HTTP status code to return to the client.
|
List<AwsWafv2CustomHttpHeader> |
getResponseHeaders()
The HTTP headers to use in the response.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCustomResponseBodyKey(String customResponseBodyKey)
References the response body that you want WAF to return to the web request client.
|
void |
setResponseCode(Integer responseCode)
The HTTP status code to return to the client.
|
void |
setResponseHeaders(Collection<AwsWafv2CustomHttpHeader> responseHeaders)
The HTTP headers to use in the response.
|
String |
toString()
Returns a string representation of this object.
|
AwsWafv2CustomResponseDetails |
withCustomResponseBodyKey(String customResponseBodyKey)
References the response body that you want WAF to return to the web request client.
|
AwsWafv2CustomResponseDetails |
withResponseCode(Integer responseCode)
The HTTP status code to return to the client.
|
AwsWafv2CustomResponseDetails |
withResponseHeaders(AwsWafv2CustomHttpHeader... responseHeaders)
The HTTP headers to use in the response.
|
AwsWafv2CustomResponseDetails |
withResponseHeaders(Collection<AwsWafv2CustomHttpHeader> responseHeaders)
The HTTP headers to use in the response.
|
public void setCustomResponseBodyKey(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.
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.public String getCustomResponseBodyKey()
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.
public AwsWafv2CustomResponseDetails withCustomResponseBodyKey(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.
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.public void setResponseCode(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.public Integer getResponseCode()
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.
public AwsWafv2CustomResponseDetails withResponseCode(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.public List<AwsWafv2CustomHttpHeader> getResponseHeaders()
The HTTP headers to use in the response.
public void setResponseHeaders(Collection<AwsWafv2CustomHttpHeader> responseHeaders)
The HTTP headers to use in the response.
responseHeaders
- The HTTP headers to use in the response.public AwsWafv2CustomResponseDetails withResponseHeaders(AwsWafv2CustomHttpHeader... responseHeaders)
The HTTP headers to use in the response.
NOTE: This method appends the values to the existing list (if any). Use
setResponseHeaders(java.util.Collection)
or withResponseHeaders(java.util.Collection)
if you
want to override the existing values.
responseHeaders
- The HTTP headers to use in the response.public AwsWafv2CustomResponseDetails withResponseHeaders(Collection<AwsWafv2CustomHttpHeader> responseHeaders)
The HTTP headers to use in the response.
responseHeaders
- The HTTP headers to use in the response.public String toString()
toString
in class Object
Object.toString()
public AwsWafv2CustomResponseDetails clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.