Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data CustomResponse = CustomResponse' {}
- newCustomResponse :: Natural -> CustomResponse
- customResponse_customResponseBodyKey :: Lens' CustomResponse (Maybe Text)
- customResponse_responseHeaders :: Lens' CustomResponse (Maybe (NonEmpty CustomHTTPHeader))
- customResponse_responseCode :: Lens' CustomResponse Natural
Documentation
data CustomResponse Source #
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.
See: newCustomResponse
smart constructor.
CustomResponse' | |
|
Instances
Create a value of CustomResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:customResponseBodyKey:CustomResponse'
, customResponse_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.
$sel:responseHeaders:CustomResponse'
, customResponse_responseHeaders
- The HTTP headers to use in the response. 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.
$sel:responseCode:CustomResponse'
, customResponse_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_customResponseBodyKey :: Lens' CustomResponse (Maybe Text) Source #
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_responseHeaders :: Lens' CustomResponse (Maybe (NonEmpty CustomHTTPHeader)) Source #
The HTTP headers to use in the response. 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_responseCode :: Lens' CustomResponse Natural Source #
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.