#[non_exhaustive]pub struct RateBasedStatementCustomKeyBuilder { /* private fields */ }
Expand description
A builder for RateBasedStatementCustomKey
.
Implementations§
source§impl RateBasedStatementCustomKeyBuilder
impl RateBasedStatementCustomKeyBuilder
sourcepub fn header(self, input: RateLimitHeader) -> Self
pub fn header(self, input: RateLimitHeader) -> Self
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.
sourcepub fn set_header(self, input: Option<RateLimitHeader>) -> Self
pub fn set_header(self, input: Option<RateLimitHeader>) -> Self
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.
sourcepub fn get_header(&self) -> &Option<RateLimitHeader>
pub fn get_header(&self) -> &Option<RateLimitHeader>
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.
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.
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.
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.
sourcepub fn query_argument(self, input: RateLimitQueryArgument) -> Self
pub fn query_argument(self, input: RateLimitQueryArgument) -> Self
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.
sourcepub fn set_query_argument(self, input: Option<RateLimitQueryArgument>) -> Self
pub fn set_query_argument(self, input: Option<RateLimitQueryArgument>) -> Self
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.
sourcepub fn get_query_argument(&self) -> &Option<RateLimitQueryArgument>
pub fn get_query_argument(&self) -> &Option<RateLimitQueryArgument>
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.
sourcepub fn query_string(self, input: RateLimitQueryString) -> Self
pub fn query_string(self, input: RateLimitQueryString) -> Self
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.
sourcepub fn set_query_string(self, input: Option<RateLimitQueryString>) -> Self
pub fn set_query_string(self, input: Option<RateLimitQueryString>) -> Self
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.
sourcepub fn get_query_string(&self) -> &Option<RateLimitQueryString>
pub fn get_query_string(&self) -> &Option<RateLimitQueryString>
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.
sourcepub fn http_method(self, input: RateLimitHttpMethod) -> Self
pub fn http_method(self, input: RateLimitHttpMethod) -> Self
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.
sourcepub fn set_http_method(self, input: Option<RateLimitHttpMethod>) -> Self
pub fn set_http_method(self, input: Option<RateLimitHttpMethod>) -> Self
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.
sourcepub fn get_http_method(&self) -> &Option<RateLimitHttpMethod>
pub fn get_http_method(&self) -> &Option<RateLimitHttpMethod>
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.
sourcepub fn forwarded_ip(self, input: RateLimitForwardedIp) -> Self
pub fn forwarded_ip(self, input: RateLimitForwardedIp) -> Self
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.
sourcepub fn set_forwarded_ip(self, input: Option<RateLimitForwardedIp>) -> Self
pub fn set_forwarded_ip(self, input: Option<RateLimitForwardedIp>) -> Self
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.
sourcepub fn get_forwarded_ip(&self) -> &Option<RateLimitForwardedIp>
pub fn get_forwarded_ip(&self) -> &Option<RateLimitForwardedIp>
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.
sourcepub fn ip(self, input: RateLimitIp) -> Self
pub fn ip(self, input: RateLimitIp) -> Self
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
.
sourcepub fn set_ip(self, input: Option<RateLimitIp>) -> Self
pub fn set_ip(self, input: Option<RateLimitIp>) -> Self
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
.
sourcepub fn get_ip(&self) -> &Option<RateLimitIp>
pub fn get_ip(&self) -> &Option<RateLimitIp>
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
.
sourcepub fn label_namespace(self, input: RateLimitLabelNamespace) -> Self
pub fn label_namespace(self, input: RateLimitLabelNamespace) -> Self
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.
sourcepub fn set_label_namespace(self, input: Option<RateLimitLabelNamespace>) -> Self
pub fn set_label_namespace(self, input: Option<RateLimitLabelNamespace>) -> Self
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.
sourcepub fn get_label_namespace(&self) -> &Option<RateLimitLabelNamespace>
pub fn get_label_namespace(&self) -> &Option<RateLimitLabelNamespace>
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.
sourcepub fn uri_path(self, input: RateLimitUriPath) -> Self
pub fn uri_path(self, input: RateLimitUriPath) -> Self
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.
sourcepub fn set_uri_path(self, input: Option<RateLimitUriPath>) -> Self
pub fn set_uri_path(self, input: Option<RateLimitUriPath>) -> Self
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.
sourcepub fn get_uri_path(&self) -> &Option<RateLimitUriPath>
pub fn get_uri_path(&self) -> &Option<RateLimitUriPath>
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.
sourcepub fn build(self) -> RateBasedStatementCustomKey
pub fn build(self) -> RateBasedStatementCustomKey
Consumes the builder and constructs a RateBasedStatementCustomKey
.
Trait Implementations§
source§impl Clone for RateBasedStatementCustomKeyBuilder
impl Clone for RateBasedStatementCustomKeyBuilder
source§fn clone(&self) -> RateBasedStatementCustomKeyBuilder
fn clone(&self) -> RateBasedStatementCustomKeyBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for RateBasedStatementCustomKeyBuilder
impl Default for RateBasedStatementCustomKeyBuilder
source§fn default() -> RateBasedStatementCustomKeyBuilder
fn default() -> RateBasedStatementCustomKeyBuilder
source§impl PartialEq for RateBasedStatementCustomKeyBuilder
impl PartialEq for RateBasedStatementCustomKeyBuilder
source§fn eq(&self, other: &RateBasedStatementCustomKeyBuilder) -> bool
fn eq(&self, other: &RateBasedStatementCustomKeyBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.