Class: Aws::WAFV2::Types::CustomResponse
- Inherits:
-
Struct
- Object
- Struct
- Aws::WAFV2::Types::CustomResponse
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-wafv2/types.rb
Overview
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][1
-
in the *WAF
Developer Guide*.
[1]: docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#custom_response_body_key ⇒ String
References the response body that you want WAF to return to the web request client.
-
#response_code ⇒ Integer
The HTTP status code to return to the client.
-
#response_headers ⇒ Array<Types::CustomHTTPHeader>
The HTTP headers to use in the response.
Instance Attribute Details
#custom_response_body_key ⇒ String
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.
1991 1992 1993 1994 1995 1996 1997 |
# File 'lib/aws-sdk-wafv2/types.rb', line 1991 class CustomResponse < Struct.new( :response_code, :custom_response_body_key, :response_headers) SENSITIVE = [] include Aws::Structure end |
#response_code ⇒ Integer
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*.
[1]: docs.aws.amazon.com/waf/latest/developerguide/customizing-the-response-status-codes.html
1991 1992 1993 1994 1995 1996 1997 |
# File 'lib/aws-sdk-wafv2/types.rb', line 1991 class CustomResponse < Struct.new( :response_code, :custom_response_body_key, :response_headers) SENSITIVE = [] include Aws::Structure end |
#response_headers ⇒ Array<Types::CustomHTTPHeader>
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*.
[1]: docs.aws.amazon.com/waf/latest/developerguide/limits.html
1991 1992 1993 1994 1995 1996 1997 |
# File 'lib/aws-sdk-wafv2/types.rb', line 1991 class CustomResponse < Struct.new( :response_code, :custom_response_body_key, :response_headers) SENSITIVE = [] include Aws::Structure end |