Class LabelMatchStatement
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<LabelMatchStatement.Builder,
LabelMatchStatement>
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.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LabelMatchStatement.Builder
builder()
final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
final String
key()
The string to match against.final LabelMatchScope
scope()
Specify whether you want to match using the label name or just the namespace.final String
Specify whether you want to match using the label name or just the namespace.static Class
<? extends LabelMatchStatement.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
scope
Specify whether you want to match using the label name or just the namespace.
If the service returns an enum value that is not available in the current SDK version,
scope
will returnLabelMatchScope.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromscopeAsString()
.- Returns:
- Specify whether you want to match using the label name or just the namespace.
- See Also:
-
scopeAsString
Specify whether you want to match using the label name or just the namespace.
If the service returns an enum value that is not available in the current SDK version,
scope
will returnLabelMatchScope.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromscopeAsString()
.- Returns:
- Specify whether you want to match using the label name or just the namespace.
- See Also:
-
key
The string to match against. The setting you provide for this depends on the match statement's
Scope
setting:-
If the
Scope
indicatesLABEL
, 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
Scope
indicatesNAMESPACE
, 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
.- Returns:
- The string to match against. The setting you provide for this depends on the match statement's
Scope
setting:-
If the
Scope
indicatesLABEL
, 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
Scope
indicatesNAMESPACE
, 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
. -
-
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<LabelMatchStatement.Builder,
LabelMatchStatement> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-