Struct aws_sdk_wafv2::types::LabelMatchStatement
source · #[non_exhaustive]pub struct LabelMatchStatement {
pub scope: LabelMatchScope,
pub key: String,
}Expand description
A rule statement to match against labels that have been added to the web request by rules that have already run in the web ACL.
The label match statement provides the label or namespace string to search for. The label string can represent a part or all of the fully qualified label name that had been added to the web request. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label. If you do not provide the fully qualified name in your label match string, WAF performs the search for labels that were added in the same context as the label match statement.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.scope: LabelMatchScopeSpecify whether you want to match using the label name or just the namespace.
key: StringThe string to match against. The setting you provide for this depends on the match statement's Scope setting:
-
If the
ScopeindicatesLABEL, then this specification must include the name and can include any number of preceding namespace specifications and prefix up to providing the fully qualified label name. -
If the
ScopeindicatesNAMESPACE, then this specification can include any number of contiguous namespace strings, and can include the entire label namespace prefix from the rule group or web ACL where the label originates.
Labels are case sensitive and components of a label must be separated by colon, for example NS1:NS2:name.
Implementations§
source§impl LabelMatchStatement
impl LabelMatchStatement
sourcepub fn scope(&self) -> &LabelMatchScope
pub fn scope(&self) -> &LabelMatchScope
Specify whether you want to match using the label name or just the namespace.
sourcepub fn key(&self) -> &str
pub fn key(&self) -> &str
The string to match against. The setting you provide for this depends on the match statement's Scope setting:
-
If the
ScopeindicatesLABEL, then this specification must include the name and can include any number of preceding namespace specifications and prefix up to providing the fully qualified label name. -
If the
ScopeindicatesNAMESPACE, then this specification can include any number of contiguous namespace strings, and can include the entire label namespace prefix from the rule group or web ACL where the label originates.
Labels are case sensitive and components of a label must be separated by colon, for example NS1:NS2:name.
source§impl LabelMatchStatement
impl LabelMatchStatement
sourcepub fn builder() -> LabelMatchStatementBuilder
pub fn builder() -> LabelMatchStatementBuilder
Creates a new builder-style object to manufacture LabelMatchStatement.
Trait Implementations§
source§impl Clone for LabelMatchStatement
impl Clone for LabelMatchStatement
source§fn clone(&self) -> LabelMatchStatement
fn clone(&self) -> LabelMatchStatement
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for LabelMatchStatement
impl Debug for LabelMatchStatement
source§impl PartialEq for LabelMatchStatement
impl PartialEq for LabelMatchStatement
impl StructuralPartialEq for LabelMatchStatement
Auto Trait Implementations§
impl Freeze for LabelMatchStatement
impl RefUnwindSafe for LabelMatchStatement
impl Send for LabelMatchStatement
impl Sync for LabelMatchStatement
impl Unpin for LabelMatchStatement
impl UnwindSafe for LabelMatchStatement
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more