Struct aws_sdk_wafv2::model::rate_based_statement::Builder
source · [−]#[non_exhaustive]pub struct Builder { /* private fields */ }Expand description
A builder for RateBasedStatement
Implementations
sourceimpl Builder
impl Builder
sourcepub fn limit(self, input: i64) -> Self
pub fn limit(self, input: i64) -> Self
The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement, this limit is applied only to the requests that match the statement.
sourcepub fn set_limit(self, input: Option<i64>) -> Self
pub fn set_limit(self, input: Option<i64>) -> Self
The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement, this limit is applied only to the requests that match the statement.
sourcepub fn aggregate_key_type(
self,
input: RateBasedStatementAggregateKeyType
) -> Self
pub fn aggregate_key_type(
self,
input: RateBasedStatementAggregateKeyType
) -> Self
Setting that indicates how to aggregate the request counts. The options are the following:
-
IP - Aggregate the request counts on the IP address from the web request origin.
-
FORWARDED_IP - Aggregate the request counts on the first IP address in an HTTP header. If you use this, configure the
ForwardedIPConfig, to specify the header to use.
sourcepub fn set_aggregate_key_type(
self,
input: Option<RateBasedStatementAggregateKeyType>
) -> Self
pub fn set_aggregate_key_type(
self,
input: Option<RateBasedStatementAggregateKeyType>
) -> Self
Setting that indicates how to aggregate the request counts. The options are the following:
-
IP - Aggregate the request counts on the IP address from the web request origin.
-
FORWARDED_IP - Aggregate the request counts on the first IP address in an HTTP header. If you use this, configure the
ForwardedIPConfig, to specify the header to use.
sourcepub fn scope_down_statement(self, input: impl Into<Box<Statement>>) -> Self
pub fn scope_down_statement(self, input: impl Into<Box<Statement>>) -> Self
An optional nested statement that narrows the scope of the web requests that are evaluated by the rate-based statement. Requests are only tracked by the rate-based statement if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.
sourcepub fn set_scope_down_statement(self, input: Option<Box<Statement>>) -> Self
pub fn set_scope_down_statement(self, input: Option<Box<Statement>>) -> Self
An optional nested statement that narrows the scope of the web requests that are evaluated by the rate-based statement. Requests are only tracked by the rate-based statement if they match the scope-down statement. You can use any nestable Statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.
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.
This is required if AggregateKeyType is set to FORWARDED_IP.
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.
This is required if AggregateKeyType is set to FORWARDED_IP.
sourcepub fn build(self) -> RateBasedStatement
pub fn build(self) -> RateBasedStatement
Consumes the builder and constructs a RateBasedStatement
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more