/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Specifies a single custom aggregate key for a rate-base rule. Web requests that are missing any of the components specified in the
* aggregation keys are omitted from the rate-based rule evaluation and handling.
* See Also:
AWS
* API Reference
Use the value of a header in the request as an aggregate key. Each distinct * value in the header contributes to the aggregation instance. If you use a single * header as your custom key, then each value fully defines an aggregation * instance.
*/ inline const RateLimitHeader& GetHeader() const{ return m_header; } /** *Use the value of a header in the request as an aggregate key. Each distinct * value in the header contributes to the aggregation instance. If you use a single * header as your custom key, then each value fully defines an aggregation * instance.
*/ inline bool HeaderHasBeenSet() const { return m_headerHasBeenSet; } /** *Use the value of a header in the request as an aggregate key. Each distinct * value in the header contributes to the aggregation instance. If you use a single * header as your custom key, then each value fully defines an aggregation * instance.
*/ inline void SetHeader(const RateLimitHeader& value) { m_headerHasBeenSet = true; m_header = value; } /** *Use the value of a header in the request as an aggregate key. Each distinct * value in the header contributes to the aggregation instance. If you use a single * header as your custom key, then each value fully defines an aggregation * instance.
*/ inline void SetHeader(RateLimitHeader&& value) { m_headerHasBeenSet = true; m_header = std::move(value); } /** *Use the value of a header in the request as an aggregate key. Each distinct * value in the header contributes to the aggregation instance. If you use a single * header as your custom key, then each value fully defines an aggregation * instance.
*/ inline RateBasedStatementCustomKey& WithHeader(const RateLimitHeader& value) { SetHeader(value); return *this;} /** *Use the value of a header in the request as an aggregate key. Each distinct * value in the header contributes to the aggregation instance. If you use a single * header as your custom key, then each value fully defines an aggregation * instance.
*/ inline RateBasedStatementCustomKey& WithHeader(RateLimitHeader&& value) { SetHeader(std::move(value)); return *this;} /** *Use the value of a cookie in the request as an aggregate key. Each distinct * value in the cookie contributes to the aggregation instance. If you use a single * cookie as your custom key, then each value fully defines an aggregation * instance.
*/ inline const RateLimitCookie& GetCookie() const{ return m_cookie; } /** *Use the value of a cookie in the request as an aggregate key. Each distinct * value in the cookie contributes to the aggregation instance. If you use a single * cookie as your custom key, then each value fully defines an aggregation * instance.
*/ inline bool CookieHasBeenSet() const { return m_cookieHasBeenSet; } /** *Use the value of a cookie in the request as an aggregate key. Each distinct * value in the cookie contributes to the aggregation instance. If you use a single * cookie as your custom key, then each value fully defines an aggregation * instance.
*/ inline void SetCookie(const RateLimitCookie& value) { m_cookieHasBeenSet = true; m_cookie = value; } /** *Use the value of a cookie in the request as an aggregate key. Each distinct * value in the cookie contributes to the aggregation instance. If you use a single * cookie as your custom key, then each value fully defines an aggregation * instance.
*/ inline void SetCookie(RateLimitCookie&& value) { m_cookieHasBeenSet = true; m_cookie = std::move(value); } /** *Use the value of a cookie in the request as an aggregate key. Each distinct * value in the cookie contributes to the aggregation instance. If you use a single * cookie as your custom key, then each value fully defines an aggregation * instance.
*/ inline RateBasedStatementCustomKey& WithCookie(const RateLimitCookie& value) { SetCookie(value); return *this;} /** *Use the value of a cookie in the request as an aggregate key. Each distinct * value in the cookie contributes to the aggregation instance. If you use a single * cookie as your custom key, then each value fully defines an aggregation * instance.
*/ inline RateBasedStatementCustomKey& WithCookie(RateLimitCookie&& value) { SetCookie(std::move(value)); return *this;} /** *Use the specified query argument as an aggregate key. Each distinct value for * the named query argument contributes to the aggregation instance. If you use a * single query argument as your custom key, then each value fully defines an * aggregation instance.
*/ inline const RateLimitQueryArgument& GetQueryArgument() const{ return m_queryArgument; } /** *Use the specified query argument as an aggregate key. Each distinct value for * the named query argument contributes to the aggregation instance. If you use a * single query argument as your custom key, then each value fully defines an * aggregation instance.
*/ inline bool QueryArgumentHasBeenSet() const { return m_queryArgumentHasBeenSet; } /** *Use the specified query argument as an aggregate key. Each distinct value for * the named query argument contributes to the aggregation instance. If you use a * single query argument as your custom key, then each value fully defines an * aggregation instance.
*/ inline void SetQueryArgument(const RateLimitQueryArgument& value) { m_queryArgumentHasBeenSet = true; m_queryArgument = value; } /** *Use the specified query argument as an aggregate key. Each distinct value for * the named query argument contributes to the aggregation instance. If you use a * single query argument as your custom key, then each value fully defines an * aggregation instance.
*/ inline void SetQueryArgument(RateLimitQueryArgument&& value) { m_queryArgumentHasBeenSet = true; m_queryArgument = std::move(value); } /** *Use the specified query argument as an aggregate key. Each distinct value for * the named query argument contributes to the aggregation instance. If you use a * single query argument as your custom key, then each value fully defines an * aggregation instance.
*/ inline RateBasedStatementCustomKey& WithQueryArgument(const RateLimitQueryArgument& value) { SetQueryArgument(value); return *this;} /** *Use the specified query argument as an aggregate key. Each distinct value for * the named query argument contributes to the aggregation instance. If you use a * single query argument as your custom key, then each value fully defines an * aggregation instance.
*/ inline RateBasedStatementCustomKey& WithQueryArgument(RateLimitQueryArgument&& value) { SetQueryArgument(std::move(value)); return *this;} /** *Use the request's query string as an aggregate key. Each distinct string * contributes to the aggregation instance. If you use just the query string as * your custom key, then each string fully defines an aggregation instance.
*/ inline const RateLimitQueryString& GetQueryString() const{ return m_queryString; } /** *Use the request's query string as an aggregate key. Each distinct string * contributes to the aggregation instance. If you use just the query string as * your custom key, then each string fully defines an aggregation instance.
*/ inline bool QueryStringHasBeenSet() const { return m_queryStringHasBeenSet; } /** *Use the request's query string as an aggregate key. Each distinct string * contributes to the aggregation instance. If you use just the query string as * your custom key, then each string fully defines an aggregation instance.
*/ inline void SetQueryString(const RateLimitQueryString& value) { m_queryStringHasBeenSet = true; m_queryString = value; } /** *Use the request's query string as an aggregate key. Each distinct string * contributes to the aggregation instance. If you use just the query string as * your custom key, then each string fully defines an aggregation instance.
*/ inline void SetQueryString(RateLimitQueryString&& value) { m_queryStringHasBeenSet = true; m_queryString = std::move(value); } /** *Use the request's query string as an aggregate key. Each distinct string * contributes to the aggregation instance. If you use just the query string as * your custom key, then each string fully defines an aggregation instance.
*/ inline RateBasedStatementCustomKey& WithQueryString(const RateLimitQueryString& value) { SetQueryString(value); return *this;} /** *Use the request's query string as an aggregate key. Each distinct string * contributes to the aggregation instance. If you use just the query string as * your custom key, then each string fully defines an aggregation instance.
*/ inline RateBasedStatementCustomKey& WithQueryString(RateLimitQueryString&& value) { SetQueryString(std::move(value)); return *this;} /** *Use the request's HTTP method as an aggregate key. Each distinct HTTP method * contributes to the aggregation instance. If you use just the HTTP method as your * custom key, then each method fully defines an aggregation instance.
*/ inline const RateLimitHTTPMethod& GetHTTPMethod() const{ return m_hTTPMethod; } /** *Use the request's HTTP method as an aggregate key. Each distinct HTTP method * contributes to the aggregation instance. If you use just the HTTP method as your * custom key, then each method fully defines an aggregation instance.
*/ inline bool HTTPMethodHasBeenSet() const { return m_hTTPMethodHasBeenSet; } /** *Use the request's HTTP method as an aggregate key. Each distinct HTTP method * contributes to the aggregation instance. If you use just the HTTP method as your * custom key, then each method fully defines an aggregation instance.
*/ inline void SetHTTPMethod(const RateLimitHTTPMethod& value) { m_hTTPMethodHasBeenSet = true; m_hTTPMethod = value; } /** *Use the request's HTTP method as an aggregate key. Each distinct HTTP method * contributes to the aggregation instance. If you use just the HTTP method as your * custom key, then each method fully defines an aggregation instance.
*/ inline void SetHTTPMethod(RateLimitHTTPMethod&& value) { m_hTTPMethodHasBeenSet = true; m_hTTPMethod = std::move(value); } /** *Use the request's HTTP method as an aggregate key. Each distinct HTTP method * contributes to the aggregation instance. If you use just the HTTP method as your * custom key, then each method fully defines an aggregation instance.
*/ inline RateBasedStatementCustomKey& WithHTTPMethod(const RateLimitHTTPMethod& value) { SetHTTPMethod(value); return *this;} /** *Use the request's HTTP method as an aggregate key. Each distinct HTTP method * contributes to the aggregation instance. If you use just the HTTP method as your * custom key, then each method fully defines an aggregation instance.
*/ inline RateBasedStatementCustomKey& WithHTTPMethod(RateLimitHTTPMethod&& value) { SetHTTPMethod(std::move(value)); return *this;} /** *Use the first IP address in an HTTP header as an aggregate key. Each distinct * forwarded IP address contributes to the aggregation instance.
When you
* specify an IP or forwarded IP in the custom key settings, you must also specify
* at least one other key to use. You can aggregate on only the forwarded IP
* address by specifying FORWARDED_IP
in your rate-based statement's
* AggregateKeyType
.
With this option, you must specify the
* header to use in the rate-based rule's ForwardedIPConfig
property.
*
Use the first IP address in an HTTP header as an aggregate key. Each distinct * forwarded IP address contributes to the aggregation instance.
When you
* specify an IP or forwarded IP in the custom key settings, you must also specify
* at least one other key to use. You can aggregate on only the forwarded IP
* address by specifying FORWARDED_IP
in your rate-based statement's
* AggregateKeyType
.
With this option, you must specify the
* header to use in the rate-based rule's ForwardedIPConfig
property.
*
Use the first IP address in an HTTP header as an aggregate key. Each distinct * forwarded IP address contributes to the aggregation instance.
When you
* specify an IP or forwarded IP in the custom key settings, you must also specify
* at least one other key to use. You can aggregate on only the forwarded IP
* address by specifying FORWARDED_IP
in your rate-based statement's
* AggregateKeyType
.
With this option, you must specify the
* header to use in the rate-based rule's ForwardedIPConfig
property.
*
Use the first IP address in an HTTP header as an aggregate key. Each distinct * forwarded IP address contributes to the aggregation instance.
When you
* specify an IP or forwarded IP in the custom key settings, you must also specify
* at least one other key to use. You can aggregate on only the forwarded IP
* address by specifying FORWARDED_IP
in your rate-based statement's
* AggregateKeyType
.
With this option, you must specify the
* header to use in the rate-based rule's ForwardedIPConfig
property.
*
Use the first IP address in an HTTP header as an aggregate key. Each distinct * forwarded IP address contributes to the aggregation instance.
When you
* specify an IP or forwarded IP in the custom key settings, you must also specify
* at least one other key to use. You can aggregate on only the forwarded IP
* address by specifying FORWARDED_IP
in your rate-based statement's
* AggregateKeyType
.
With this option, you must specify the
* header to use in the rate-based rule's ForwardedIPConfig
property.
*
Use the first IP address in an HTTP header as an aggregate key. Each distinct * forwarded IP address contributes to the aggregation instance.
When you
* specify an IP or forwarded IP in the custom key settings, you must also specify
* at least one other key to use. You can aggregate on only the forwarded IP
* address by specifying FORWARDED_IP
in your rate-based statement's
* AggregateKeyType
.
With this option, you must specify the
* header to use in the rate-based rule's ForwardedIPConfig
property.
*
Use the request's originating IP address as an aggregate key. Each distinct * IP address contributes to the aggregation instance.
When you specify an
* IP or forwarded IP in the custom key settings, you must also specify at least
* one other key to use. You can aggregate on only the IP address by specifying
* IP
in your rate-based statement's AggregateKeyType
.
*
Use the request's originating IP address as an aggregate key. Each distinct * IP address contributes to the aggregation instance.
When you specify an
* IP or forwarded IP in the custom key settings, you must also specify at least
* one other key to use. You can aggregate on only the IP address by specifying
* IP
in your rate-based statement's AggregateKeyType
.
*
Use the request's originating IP address as an aggregate key. Each distinct * IP address contributes to the aggregation instance.
When you specify an
* IP or forwarded IP in the custom key settings, you must also specify at least
* one other key to use. You can aggregate on only the IP address by specifying
* IP
in your rate-based statement's AggregateKeyType
.
*
Use the request's originating IP address as an aggregate key. Each distinct * IP address contributes to the aggregation instance.
When you specify an
* IP or forwarded IP in the custom key settings, you must also specify at least
* one other key to use. You can aggregate on only the IP address by specifying
* IP
in your rate-based statement's AggregateKeyType
.
*
Use the request's originating IP address as an aggregate key. Each distinct * IP address contributes to the aggregation instance.
When you specify an
* IP or forwarded IP in the custom key settings, you must also specify at least
* one other key to use. You can aggregate on only the IP address by specifying
* IP
in your rate-based statement's AggregateKeyType
.
*
Use the request's originating IP address as an aggregate key. Each distinct * IP address contributes to the aggregation instance.
When you specify an
* IP or forwarded IP in the custom key settings, you must also specify at least
* one other key to use. You can aggregate on only the IP address by specifying
* IP
in your rate-based statement's AggregateKeyType
.
*
Use the specified label namespace as an aggregate key. Each distinct fully * qualified label name that has the specified label namespace contributes to the * aggregation instance. If you use just one label namespace as your custom key, * then each label name fully defines an aggregation instance.
This uses * only labels that have been added to the request by rules that are evaluated * before this rate-based rule in the web ACL.
For information about label * namespaces and names, see Label * syntax and naming requirements in the WAF Developer Guide.
*/ inline const RateLimitLabelNamespace& GetLabelNamespace() const{ return m_labelNamespace; } /** *Use the specified label namespace as an aggregate key. Each distinct fully * qualified label name that has the specified label namespace contributes to the * aggregation instance. If you use just one label namespace as your custom key, * then each label name fully defines an aggregation instance.
This uses * only labels that have been added to the request by rules that are evaluated * before this rate-based rule in the web ACL.
For information about label * namespaces and names, see Label * syntax and naming requirements in the WAF Developer Guide.
*/ inline bool LabelNamespaceHasBeenSet() const { return m_labelNamespaceHasBeenSet; } /** *Use the specified label namespace as an aggregate key. Each distinct fully * qualified label name that has the specified label namespace contributes to the * aggregation instance. If you use just one label namespace as your custom key, * then each label name fully defines an aggregation instance.
This uses * only labels that have been added to the request by rules that are evaluated * before this rate-based rule in the web ACL.
For information about label * namespaces and names, see Label * syntax and naming requirements in the WAF Developer Guide.
*/ inline void SetLabelNamespace(const RateLimitLabelNamespace& value) { m_labelNamespaceHasBeenSet = true; m_labelNamespace = value; } /** *Use the specified label namespace as an aggregate key. Each distinct fully * qualified label name that has the specified label namespace contributes to the * aggregation instance. If you use just one label namespace as your custom key, * then each label name fully defines an aggregation instance.
This uses * only labels that have been added to the request by rules that are evaluated * before this rate-based rule in the web ACL.
For information about label * namespaces and names, see Label * syntax and naming requirements in the WAF Developer Guide.
*/ inline void SetLabelNamespace(RateLimitLabelNamespace&& value) { m_labelNamespaceHasBeenSet = true; m_labelNamespace = std::move(value); } /** *Use the specified label namespace as an aggregate key. Each distinct fully * qualified label name that has the specified label namespace contributes to the * aggregation instance. If you use just one label namespace as your custom key, * then each label name fully defines an aggregation instance.
This uses * only labels that have been added to the request by rules that are evaluated * before this rate-based rule in the web ACL.
For information about label * namespaces and names, see Label * syntax and naming requirements in the WAF Developer Guide.
*/ inline RateBasedStatementCustomKey& WithLabelNamespace(const RateLimitLabelNamespace& value) { SetLabelNamespace(value); return *this;} /** *Use the specified label namespace as an aggregate key. Each distinct fully * qualified label name that has the specified label namespace contributes to the * aggregation instance. If you use just one label namespace as your custom key, * then each label name fully defines an aggregation instance.
This uses * only labels that have been added to the request by rules that are evaluated * before this rate-based rule in the web ACL.
For information about label * namespaces and names, see Label * syntax and naming requirements in the WAF Developer Guide.
*/ inline RateBasedStatementCustomKey& WithLabelNamespace(RateLimitLabelNamespace&& value) { SetLabelNamespace(std::move(value)); return *this;} /** *Use the request's URI path as an aggregate key. Each distinct URI path * contributes to the aggregation instance. If you use just the URI path as your * custom key, then each URI path fully defines an aggregation instance.
*/ inline const RateLimitUriPath& GetUriPath() const{ return m_uriPath; } /** *Use the request's URI path as an aggregate key. Each distinct URI path * contributes to the aggregation instance. If you use just the URI path as your * custom key, then each URI path fully defines an aggregation instance.
*/ inline bool UriPathHasBeenSet() const { return m_uriPathHasBeenSet; } /** *Use the request's URI path as an aggregate key. Each distinct URI path * contributes to the aggregation instance. If you use just the URI path as your * custom key, then each URI path fully defines an aggregation instance.
*/ inline void SetUriPath(const RateLimitUriPath& value) { m_uriPathHasBeenSet = true; m_uriPath = value; } /** *Use the request's URI path as an aggregate key. Each distinct URI path * contributes to the aggregation instance. If you use just the URI path as your * custom key, then each URI path fully defines an aggregation instance.
*/ inline void SetUriPath(RateLimitUriPath&& value) { m_uriPathHasBeenSet = true; m_uriPath = std::move(value); } /** *Use the request's URI path as an aggregate key. Each distinct URI path * contributes to the aggregation instance. If you use just the URI path as your * custom key, then each URI path fully defines an aggregation instance.
*/ inline RateBasedStatementCustomKey& WithUriPath(const RateLimitUriPath& value) { SetUriPath(value); return *this;} /** *Use the request's URI path as an aggregate key. Each distinct URI path * contributes to the aggregation instance. If you use just the URI path as your * custom key, then each URI path fully defines an aggregation instance.
*/ inline RateBasedStatementCustomKey& WithUriPath(RateLimitUriPath&& value) { SetUriPath(std::move(value)); return *this;} private: RateLimitHeader m_header; bool m_headerHasBeenSet = false; RateLimitCookie m_cookie; bool m_cookieHasBeenSet = false; RateLimitQueryArgument m_queryArgument; bool m_queryArgumentHasBeenSet = false; RateLimitQueryString m_queryString; bool m_queryStringHasBeenSet = false; RateLimitHTTPMethod m_hTTPMethod; bool m_hTTPMethodHasBeenSet = false; RateLimitForwardedIP m_forwardedIP; bool m_forwardedIPHasBeenSet = false; RateLimitIP m_iP; bool m_iPHasBeenSet = false; RateLimitLabelNamespace m_labelNamespace; bool m_labelNamespaceHasBeenSet = false; RateLimitUriPath m_uriPath; bool m_uriPathHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws