Struct aws_sdk_wafv2::types::builders::ForwardedIpConfigBuilder
source · #[non_exhaustive]pub struct ForwardedIpConfigBuilder { /* private fields */ }
Expand description
A builder for ForwardedIpConfig
.
Implementations§
source§impl ForwardedIpConfigBuilder
impl ForwardedIpConfigBuilder
sourcepub fn header_name(self, input: impl Into<String>) -> Self
pub fn header_name(self, input: impl Into<String>) -> Self
The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For
.
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_header_name(self, input: Option<String>) -> Self
pub fn set_header_name(self, input: Option<String>) -> Self
The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For
.
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_header_name(&self) -> &Option<String>
pub fn get_header_name(&self) -> &Option<String>
The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to X-Forwarded-For
.
If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
sourcepub fn fallback_behavior(self, input: FallbackBehavior) -> Self
pub fn fallback_behavior(self, input: FallbackBehavior) -> Self
The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.
If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
You can specify the following fallback behaviors:
-
MATCH
- Treat the web request as matching the rule statement. WAF applies the rule action to the request. -
NO_MATCH
- Treat the web request as not matching the rule statement.
sourcepub fn set_fallback_behavior(self, input: Option<FallbackBehavior>) -> Self
pub fn set_fallback_behavior(self, input: Option<FallbackBehavior>) -> Self
The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.
If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
You can specify the following fallback behaviors:
-
MATCH
- Treat the web request as matching the rule statement. WAF applies the rule action to the request. -
NO_MATCH
- Treat the web request as not matching the rule statement.
sourcepub fn get_fallback_behavior(&self) -> &Option<FallbackBehavior>
pub fn get_fallback_behavior(&self) -> &Option<FallbackBehavior>
The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.
If the specified header isn't present in the request, WAF doesn't apply the rule to the web request at all.
You can specify the following fallback behaviors:
-
MATCH
- Treat the web request as matching the rule statement. WAF applies the rule action to the request. -
NO_MATCH
- Treat the web request as not matching the rule statement.
sourcepub fn build(self) -> Result<ForwardedIpConfig, BuildError>
pub fn build(self) -> Result<ForwardedIpConfig, BuildError>
Consumes the builder and constructs a ForwardedIpConfig
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for ForwardedIpConfigBuilder
impl Clone for ForwardedIpConfigBuilder
source§fn clone(&self) -> ForwardedIpConfigBuilder
fn clone(&self) -> ForwardedIpConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ForwardedIpConfigBuilder
impl Debug for ForwardedIpConfigBuilder
source§impl Default for ForwardedIpConfigBuilder
impl Default for ForwardedIpConfigBuilder
source§fn default() -> ForwardedIpConfigBuilder
fn default() -> ForwardedIpConfigBuilder
source§impl PartialEq for ForwardedIpConfigBuilder
impl PartialEq for ForwardedIpConfigBuilder
source§fn eq(&self, other: &ForwardedIpConfigBuilder) -> bool
fn eq(&self, other: &ForwardedIpConfigBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.