Struct aws_sdk_wafv2::model::SizeConstraintStatement
source · [−]#[non_exhaustive]pub struct SizeConstraintStatement { /* private fields */ }
Expand description
A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<). For example, you can use a size constraint statement to look for query strings that are longer than 100 bytes.
If you configure WAF to inspect the request body, WAF inspects only the first 8192 bytes (8 KB). If the request body for your web requests never exceeds 8192 bytes, you could use a size constraint statement to block requests that have a request body greater than 8192 bytes.
If you choose URI for the value of Part of the request to filter on, the slash (/) in the URI counts as one character. For example, the URI /logo.jpg
is nine characters long.
Implementations
sourceimpl SizeConstraintStatement
impl SizeConstraintStatement
sourcepub fn field_to_match(&self) -> Option<&FieldToMatch>
pub fn field_to_match(&self) -> Option<&FieldToMatch>
The part of the web request that you want WAF to inspect.
sourcepub fn comparison_operator(&self) -> Option<&ComparisonOperator>
pub fn comparison_operator(&self) -> Option<&ComparisonOperator>
The operator to use to compare the request part to the size setting.
sourcepub fn size(&self) -> i64
pub fn size(&self) -> i64
The size, in byte, to compare to the request part, after any transformations.
sourcepub fn text_transformations(&self) -> Option<&[TextTransformation]>
pub fn text_transformations(&self) -> Option<&[TextTransformation]>
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, WAF performs all transformations on the content of the request component identified by FieldToMatch
, starting from the lowest priority setting, before inspecting the content for a match.
sourceimpl SizeConstraintStatement
impl SizeConstraintStatement
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture SizeConstraintStatement
.
Trait Implementations
sourceimpl Clone for SizeConstraintStatement
impl Clone for SizeConstraintStatement
sourcefn clone(&self) -> SizeConstraintStatement
fn clone(&self) -> SizeConstraintStatement
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SizeConstraintStatement
impl Debug for SizeConstraintStatement
sourceimpl PartialEq<SizeConstraintStatement> for SizeConstraintStatement
impl PartialEq<SizeConstraintStatement> for SizeConstraintStatement
sourcefn eq(&self, other: &SizeConstraintStatement) -> bool
fn eq(&self, other: &SizeConstraintStatement) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SizeConstraintStatement) -> bool
fn ne(&self, other: &SizeConstraintStatement) -> bool
This method tests for !=
.
impl StructuralPartialEq for SizeConstraintStatement
Auto Trait Implementations
impl RefUnwindSafe for SizeConstraintStatement
impl Send for SizeConstraintStatement
impl Sync for SizeConstraintStatement
impl Unpin for SizeConstraintStatement
impl UnwindSafe for SizeConstraintStatement
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