Struct aws_sdk_wafv2::model::FieldToMatch
source · [−]#[non_exhaustive]pub struct FieldToMatch { /* private fields */ }
Expand description
The part of the web request that you want WAF to inspect. Include the single FieldToMatch
type that you want to inspect, with additional specifications as needed, according to the type. You specify a single request component in FieldToMatch
for each rule statement that requires it. To inspect more than one component of the web request, create a separate rule statement for each component.
Example JSON for a QueryString
field to match:
"FieldToMatch": { "QueryString": {} }
Example JSON for a Method
field to match specification:
"FieldToMatch": { "Method": { "Name": "DELETE" } }
Implementations
sourceimpl FieldToMatch
impl FieldToMatch
sourcepub fn single_header(&self) -> Option<&SingleHeader>
pub fn single_header(&self) -> Option<&SingleHeader>
Inspect a single header. Provide the name of the header to inspect, for example, User-Agent
or Referer
. This setting isn't case sensitive.
Example JSON: "SingleHeader": { "Name": "haystack" }
Alternately, you can filter and inspect all headers with the Headers
FieldToMatch
setting.
sourcepub fn single_query_argument(&self) -> Option<&SingleQueryArgument>
pub fn single_query_argument(&self) -> Option<&SingleQueryArgument>
Inspect a single query argument. Provide the name of the query argument to inspect, such as UserName or SalesRegion. The name can be up to 30 characters long and isn't case sensitive.
Example JSON: "SingleQueryArgument": { "Name": "myArgument" }
sourcepub fn all_query_arguments(&self) -> Option<&AllQueryArguments>
pub fn all_query_arguments(&self) -> Option<&AllQueryArguments>
Inspect all query arguments.
sourcepub fn uri_path(&self) -> Option<&UriPath>
pub fn uri_path(&self) -> Option<&UriPath>
Inspect the request URI path. This is the part of the web request that identifies a resource, for example, /images/daily-ad.jpg
.
sourcepub fn query_string(&self) -> Option<&QueryString>
pub fn query_string(&self) -> Option<&QueryString>
Inspect the query string. This is the part of a URL that appears after a ?
character, if any.
sourcepub fn body(&self) -> Option<&Body>
pub fn body(&self) -> Option<&Body>
Inspect the request body as plain text. The request body immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form.
Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the Body
object configuration.
sourcepub fn method(&self) -> Option<&Method>
pub fn method(&self) -> Option<&Method>
Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to perform.
sourcepub fn json_body(&self) -> Option<&JsonBody>
pub fn json_body(&self) -> Option<&JsonBody>
Inspect the request body as JSON. The request body immediately follows the request headers. This is the part of a request that contains any additional data that you want to send to your web server as the HTTP request body, such as data from a form.
Only the first 8 KB (8192 bytes) of the request body are forwarded to WAF for inspection by the underlying host service. For information about how to handle oversized request bodies, see the JsonBody
object configuration.
sourcepub fn headers(&self) -> Option<&Headers>
pub fn headers(&self) -> Option<&Headers>
Inspect the request headers. You must configure scope and pattern matching filters in the Headers
object, to define the set of headers to and the parts of the headers that WAF inspects.
Only the first 8 KB (8192 bytes) of a request's headers and only the first 200 headers are forwarded to WAF for inspection by the underlying host service. You must configure how to handle any oversize header content in the Headers
object. WAF applies the pattern matching filters to the headers that it receives from the underlying host service.
Inspect the request cookies. You must configure scope and pattern matching filters in the Cookies
object, to define the set of cookies and the parts of the cookies that WAF inspects.
Only the first 8 KB (8192 bytes) of a request's cookies and only the first 200 cookies are forwarded to WAF for inspection by the underlying host service. You must configure how to handle any oversize cookie content in the Cookies
object. WAF applies the pattern matching filters to the cookies that it receives from the underlying host service.
sourceimpl FieldToMatch
impl FieldToMatch
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture FieldToMatch
.
Trait Implementations
sourceimpl Clone for FieldToMatch
impl Clone for FieldToMatch
sourcefn clone(&self) -> FieldToMatch
fn clone(&self) -> FieldToMatch
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 FieldToMatch
impl Debug for FieldToMatch
sourceimpl PartialEq<FieldToMatch> for FieldToMatch
impl PartialEq<FieldToMatch> for FieldToMatch
sourcefn eq(&self, other: &FieldToMatch) -> bool
fn eq(&self, other: &FieldToMatch) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FieldToMatch) -> bool
fn ne(&self, other: &FieldToMatch) -> bool
This method tests for !=
.
impl StructuralPartialEq for FieldToMatch
Auto Trait Implementations
impl RefUnwindSafe for FieldToMatch
impl Send for FieldToMatch
impl Sync for FieldToMatch
impl Unpin for FieldToMatch
impl UnwindSafe for FieldToMatch
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