Interface FieldToMatch.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<FieldToMatch.Builder,,FieldToMatch> SdkBuilder<FieldToMatch.Builder,,FieldToMatch> SdkPojo
- Enclosing class:
FieldToMatch
-
Method Summary
Modifier and TypeMethodDescriptiondefault FieldToMatch.BuilderallQueryArguments(Consumer<AllQueryArguments.Builder> allQueryArguments) Inspect all query arguments.allQueryArguments(AllQueryArguments allQueryArguments) Inspect all query arguments.default FieldToMatch.Builderbody(Consumer<Body.Builder> body) Inspect the request body as plain text.Inspect the request body as plain text.default FieldToMatch.Buildercookies(Consumer<Cookies.Builder> cookies) Inspect the request cookies.Inspect the request cookies.default FieldToMatch.BuilderheaderOrder(Consumer<HeaderOrder.Builder> headerOrder) Inspect a string containing the list of the request's header names, ordered as they appear in the web request that WAF receives for inspection.headerOrder(HeaderOrder headerOrder) Inspect a string containing the list of the request's header names, ordered as they appear in the web request that WAF receives for inspection.default FieldToMatch.Builderheaders(Consumer<Headers.Builder> headers) Inspect the request headers.Inspect the request headers.default FieldToMatch.Builderja3Fingerprint(Consumer<JA3Fingerprint.Builder> ja3Fingerprint) Available for use with Amazon CloudFront distributions and Application Load Balancers.ja3Fingerprint(JA3Fingerprint ja3Fingerprint) Available for use with Amazon CloudFront distributions and Application Load Balancers.default FieldToMatch.BuilderjsonBody(Consumer<JsonBody.Builder> jsonBody) Inspect the request body as JSON.Inspect the request body as JSON.default FieldToMatch.Buildermethod(Consumer<Method.Builder> method) Inspect the HTTP method.Inspect the HTTP method.default FieldToMatch.BuilderqueryString(Consumer<QueryString.Builder> queryString) Inspect the query string.queryString(QueryString queryString) Inspect the query string.default FieldToMatch.BuildersingleHeader(Consumer<SingleHeader.Builder> singleHeader) Inspect a single header.singleHeader(SingleHeader singleHeader) Inspect a single header.default FieldToMatch.BuildersingleQueryArgument(Consumer<SingleQueryArgument.Builder> singleQueryArgument) Inspect a single query argument.singleQueryArgument(SingleQueryArgument singleQueryArgument) Inspect a single query argument.default FieldToMatch.BuilderuriPath(Consumer<UriPath.Builder> uriPath) Inspect the request URI path.Inspect the request URI path.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
singleHeader
Inspect a single header. Provide the name of the header to inspect, for example,
User-AgentorReferer. This setting isn't case sensitive.Example JSON:
"SingleHeader": { "Name": "haystack" }Alternately, you can filter and inspect all headers with the
HeadersFieldToMatchsetting.- Parameters:
singleHeader- Inspect a single header. Provide the name of the header to inspect, for example,User-AgentorReferer. This setting isn't case sensitive.Example JSON:
"SingleHeader": { "Name": "haystack" }Alternately, you can filter and inspect all headers with the
HeadersFieldToMatchsetting.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
singleHeader
Inspect a single header. Provide the name of the header to inspect, for example,
User-AgentorReferer. This setting isn't case sensitive.Example JSON:
"SingleHeader": { "Name": "haystack" }Alternately, you can filter and inspect all headers with the
This is a convenience method that creates an instance of theHeadersFieldToMatchsetting.SingleHeader.Builderavoiding the need to create one manually viaSingleHeader.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosingleHeader(SingleHeader).- Parameters:
singleHeader- a consumer that will call methods onSingleHeader.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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" }- Parameters:
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" }- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
singleQueryArgument
default FieldToMatch.Builder singleQueryArgument(Consumer<SingleQueryArgument.Builder> 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:
This is a convenience method that creates an instance of the"SingleQueryArgument": { "Name": "myArgument" }SingleQueryArgument.Builderavoiding the need to create one manually viaSingleQueryArgument.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosingleQueryArgument(SingleQueryArgument).- Parameters:
singleQueryArgument- a consumer that will call methods onSingleQueryArgument.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
allQueryArguments
Inspect all query arguments.
- Parameters:
allQueryArguments- Inspect all query arguments.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allQueryArguments
default FieldToMatch.Builder allQueryArguments(Consumer<AllQueryArguments.Builder> allQueryArguments) Inspect all query arguments.
This is a convenience method that creates an instance of theAllQueryArguments.Builderavoiding the need to create one manually viaAllQueryArguments.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toallQueryArguments(AllQueryArguments).- Parameters:
allQueryArguments- a consumer that will call methods onAllQueryArguments.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
uriPath
Inspect the request URI path. This is the part of the web request that identifies a resource, for example,
/images/daily-ad.jpg.- Parameters:
uriPath- Inspect the request URI path. This is the part of the web request that identifies a resource, for example,/images/daily-ad.jpg.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
uriPath
Inspect the request URI path. This is the part of the web request that identifies a resource, for example,
This is a convenience method that creates an instance of the/images/daily-ad.jpg.UriPath.Builderavoiding the need to create one manually viaUriPath.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed touriPath(UriPath).- Parameters:
uriPath- a consumer that will call methods onUriPath.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
queryString
Inspect the query string. This is the part of a URL that appears after a
?character, if any.- Parameters:
queryString- Inspect the query string. This is the part of a URL that appears after a?character, if any.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
queryString
Inspect the query string. This is the part of a URL that appears after a
This is a convenience method that creates an instance of the?character, if any.QueryString.Builderavoiding the need to create one manually viaQueryString.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toqueryString(QueryString).- Parameters:
queryString- a consumer that will call methods onQueryString.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.
WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.
-
For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).
-
For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL
AssociationConfig, for additional processing fees.
For information about how to handle oversized request bodies, see the
Bodyobject configuration.- Parameters:
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.WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.
-
For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).
-
For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL
AssociationConfig, for additional processing fees.
For information about how to handle oversized request bodies, see the
Bodyobject configuration.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
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.
WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.
-
For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).
-
For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL
AssociationConfig, for additional processing fees.
For information about how to handle oversized request bodies, see the
This is a convenience method that creates an instance of theBodyobject configuration.Body.Builderavoiding the need to create one manually viaBody.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tobody(Body).- Parameters:
body- a consumer that will call methods onBody.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
method
Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to perform.
- Parameters:
method- Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to perform.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
method
Inspect the HTTP method. The method indicates the type of operation that the request is asking the origin to perform.
This is a convenience method that creates an instance of theMethod.Builderavoiding the need to create one manually viaMethod.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomethod(Method).- Parameters:
method- a consumer that will call methods onMethod.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.
WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.
-
For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).
-
For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL
AssociationConfig, for additional processing fees.
For information about how to handle oversized request bodies, see the
JsonBodyobject configuration.- Parameters:
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.WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.
-
For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).
-
For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL
AssociationConfig, for additional processing fees.
For information about how to handle oversized request bodies, see the
JsonBodyobject configuration.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
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.
WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to WAF for inspection.
-
For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).
-
For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL
AssociationConfig, for additional processing fees.
For information about how to handle oversized request bodies, see the
This is a convenience method that creates an instance of theJsonBodyobject configuration.JsonBody.Builderavoiding the need to create one manually viaJsonBody.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tojsonBody(JsonBody).- Parameters:
jsonBody- a consumer that will call methods onJsonBody.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
headers
Inspect the request headers. You must configure scope and pattern matching filters in the
Headersobject, 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
Headersobject. WAF applies the pattern matching filters to the headers that it receives from the underlying host service.- Parameters:
headers- Inspect the request headers. You must configure scope and pattern matching filters in theHeadersobject, 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
Headersobject. WAF applies the pattern matching filters to the headers that it receives from the underlying host service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
headers
Inspect the request headers. You must configure scope and pattern matching filters in the
Headersobject, 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
This is a convenience method that creates an instance of theHeadersobject. WAF applies the pattern matching filters to the headers that it receives from the underlying host service.Headers.Builderavoiding the need to create one manually viaHeaders.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toheaders(Headers).- Parameters:
headers- a consumer that will call methods onHeaders.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
cookies
Inspect the request cookies. You must configure scope and pattern matching filters in the
Cookiesobject, 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
Cookiesobject. WAF applies the pattern matching filters to the cookies that it receives from the underlying host service.- Parameters:
cookies- Inspect the request cookies. You must configure scope and pattern matching filters in theCookiesobject, 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
Cookiesobject. WAF applies the pattern matching filters to the cookies that it receives from the underlying host service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
cookies
Inspect the request cookies. You must configure scope and pattern matching filters in the
Cookiesobject, 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
This is a convenience method that creates an instance of theCookiesobject. WAF applies the pattern matching filters to the cookies that it receives from the underlying host service.Cookies.Builderavoiding the need to create one manually viaCookies.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocookies(Cookies).- Parameters:
cookies- a consumer that will call methods onCookies.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
headerOrder
Inspect a string containing the list of the request's header names, ordered as they appear in the web request that WAF receives for inspection. WAF generates the string and then uses that as the field to match component in its inspection. WAF separates the header names in the string using colons and no added spaces, for example
host:user-agent:accept:authorization:referer.- Parameters:
headerOrder- Inspect a string containing the list of the request's header names, ordered as they appear in the web request that WAF receives for inspection. WAF generates the string and then uses that as the field to match component in its inspection. WAF separates the header names in the string using colons and no added spaces, for examplehost:user-agent:accept:authorization:referer.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
headerOrder
Inspect a string containing the list of the request's header names, ordered as they appear in the web request that WAF receives for inspection. WAF generates the string and then uses that as the field to match component in its inspection. WAF separates the header names in the string using colons and no added spaces, for example
This is a convenience method that creates an instance of thehost:user-agent:accept:authorization:referer.HeaderOrder.Builderavoiding the need to create one manually viaHeaderOrder.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toheaderOrder(HeaderOrder).- Parameters:
headerOrder- a consumer that will call methods onHeaderOrder.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
ja3Fingerprint
Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.
You can use this choice only with a string match
ByteMatchStatementwith thePositionalConstraintset toEXACTLY.You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.
Provide the JA3 fingerprint string from the logs in your string match statement specification, to match with any future requests that have the same TLS configuration.
- Parameters:
ja3Fingerprint- Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.You can use this choice only with a string match
ByteMatchStatementwith thePositionalConstraintset toEXACTLY.You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.
Provide the JA3 fingerprint string from the logs in your string match statement specification, to match with any future requests that have the same TLS configuration.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ja3Fingerprint
Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.
You can use this choice only with a string match
ByteMatchStatementwith thePositionalConstraintset toEXACTLY.You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.
Provide the JA3 fingerprint string from the logs in your string match statement specification, to match with any future requests that have the same TLS configuration.
This is a convenience method that creates an instance of theJA3Fingerprint.Builderavoiding the need to create one manually viaJA3Fingerprint.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toja3Fingerprint(JA3Fingerprint).- Parameters:
ja3Fingerprint- a consumer that will call methods onJA3Fingerprint.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-