CustomResponse

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 BlockAction.

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide.

Types

Link copied to clipboard
class Builder
Link copied to clipboard
object Companion

Properties

Link copied to clipboard

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.

Link copied to clipboard

The HTTP status code to return to the client.

Link copied to clipboard

The HTTP headers to use in the response. You can specify any header name except for content-type. Duplicate header names are not allowed.

Functions

Link copied to clipboard
inline fun copy(block: CustomResponse.Builder.() -> Unit = {}): CustomResponse
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String