Struct aws_sdk_wafv2::types::builders::GeoMatchStatementBuilder
source · #[non_exhaustive]pub struct GeoMatchStatementBuilder { /* private fields */ }
Expand description
A builder for GeoMatchStatement
.
Implementations§
source§impl GeoMatchStatementBuilder
impl GeoMatchStatementBuilder
sourcepub fn country_codes(self, input: CountryCode) -> Self
pub fn country_codes(self, input: CountryCode) -> Self
Appends an item to country_codes
.
To override the contents of this collection use set_country_codes
.
An array of two-character country codes that you want to match against, for example, [ "US", "CN" ]
, from the alpha-2 country ISO codes of the ISO 3166 international standard.
When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
sourcepub fn set_country_codes(self, input: Option<Vec<CountryCode>>) -> Self
pub fn set_country_codes(self, input: Option<Vec<CountryCode>>) -> Self
An array of two-character country codes that you want to match against, for example, [ "US", "CN" ]
, from the alpha-2 country ISO codes of the ISO 3166 international standard.
When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
sourcepub fn get_country_codes(&self) -> &Option<Vec<CountryCode>>
pub fn get_country_codes(&self) -> &Option<Vec<CountryCode>>
An array of two-character country codes that you want to match against, for example, [ "US", "CN" ]
, from the alpha-2 country ISO codes of the ISO 3166 international standard.
When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
sourcepub fn forwarded_ip_config(self, input: ForwardedIpConfig) -> Self
pub fn forwarded_ip_config(self, input: ForwardedIpConfig) -> Self
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
sourcepub fn set_forwarded_ip_config(self, input: Option<ForwardedIpConfig>) -> Self
pub fn set_forwarded_ip_config(self, input: Option<ForwardedIpConfig>) -> Self
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
sourcepub fn get_forwarded_ip_config(&self) -> &Option<ForwardedIpConfig>
pub fn get_forwarded_ip_config(&self) -> &Option<ForwardedIpConfig>
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
sourcepub fn build(self) -> GeoMatchStatement
pub fn build(self) -> GeoMatchStatement
Consumes the builder and constructs a GeoMatchStatement
.
Trait Implementations§
source§impl Clone for GeoMatchStatementBuilder
impl Clone for GeoMatchStatementBuilder
source§fn clone(&self) -> GeoMatchStatementBuilder
fn clone(&self) -> GeoMatchStatementBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GeoMatchStatementBuilder
impl Debug for GeoMatchStatementBuilder
source§impl Default for GeoMatchStatementBuilder
impl Default for GeoMatchStatementBuilder
source§fn default() -> GeoMatchStatementBuilder
fn default() -> GeoMatchStatementBuilder
source§impl PartialEq for GeoMatchStatementBuilder
impl PartialEq for GeoMatchStatementBuilder
source§fn eq(&self, other: &GeoMatchStatementBuilder) -> bool
fn eq(&self, other: &GeoMatchStatementBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.