/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include 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 Also:
AWS
* API Reference
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.
*/ inline int GetResponseCode() const{ return m_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.
*/ inline bool ResponseCodeHasBeenSet() const { return m_responseCodeHasBeenSet; } /** *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.
*/ inline void SetResponseCode(int value) { m_responseCodeHasBeenSet = true; m_responseCode = value; } /** *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.
*/ inline CustomResponse& WithResponseCode(int value) { SetResponseCode(value); return *this;} /** *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.
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.
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.
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.
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.
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.
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.
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.
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.
*/ inline const Aws::VectorThe 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.
*/ inline bool ResponseHeadersHasBeenSet() const { return m_responseHeadersHasBeenSet; } /** *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.
*/ inline void SetResponseHeaders(const Aws::VectorThe 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.
*/ inline void SetResponseHeaders(Aws::VectorThe 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.
*/ inline CustomResponse& WithResponseHeaders(const Aws::VectorThe 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.
*/ inline CustomResponse& WithResponseHeaders(Aws::VectorThe 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.
*/ inline CustomResponse& AddResponseHeaders(const CustomHTTPHeader& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.push_back(value); return *this; } /** *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.
*/ inline CustomResponse& AddResponseHeaders(CustomHTTPHeader&& value) { m_responseHeadersHasBeenSet = true; m_responseHeaders.push_back(std::move(value)); return *this; } private: int m_responseCode; bool m_responseCodeHasBeenSet = false; Aws::String m_customResponseBodyKey; bool m_customResponseBodyKeyHasBeenSet = false; Aws::Vector