Class HeaderMatch
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appmesh.HeaderMatch
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:46.072Z")
@Stability(Stable)
public abstract class HeaderMatch
extends software.amazon.jsii.JsiiObject
Used to generate header matching methods.
Example:
VirtualRouter router;
VirtualNode node;
router.addRoute("route-http2", RouteBaseProps.builder()
.routeSpec(RouteSpec.http2(HttpRouteSpecOptions.builder()
.weightedTargets(List.of(WeightedTarget.builder()
.virtualNode(node)
.build()))
.match(HttpRouteMatch.builder()
.path(HttpRoutePathMatch.exactly("/exact"))
.method(HttpRouteMethod.POST)
.protocol(HttpRouteProtocol.HTTPS)
.headers(List.of(HeaderMatch.valueIs("Content-Type", "application/json"), HeaderMatch.valueIsNot("Content-Type", "application/json")))
.queryParameters(List.of(QueryParameterMatch.valueIs("query-field", "value")))
.build())
.build()))
.build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedHeaderMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedHeaderMatch(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionabstract HeaderMatchConfigReturns the header match configuration.static HeaderMatchvalueDoesNotEndWith(String headerName, String suffix) The value of the header with the given name in the request must not end with the specified characters.static HeaderMatchvalueDoesNotMatchRegex(String headerName, String regex) The value of the header with the given name in the request must not include the specified characters.static HeaderMatchvalueDoesNotStartWith(String headerName, String prefix) The value of the header with the given name in the request must not start with the specified characters.static HeaderMatchvalueEndsWith(String headerName, String suffix) The value of the header with the given name in the request must end with the specified characters.static HeaderMatchThe value of the header with the given name in the request must match the specified value exactly.static HeaderMatchvalueIsNot(String headerName, String headerValue) The value of the header with the given name in the request must not match the specified value exactly.static HeaderMatchvalueMatchesRegex(String headerName, String regex) The value of the header with the given name in the request must include the specified characters.static HeaderMatchvaluesIsInRange(String headerName, Number start, Number end) The value of the header with the given name in the request must be in a range of values.static HeaderMatchvaluesIsNotInRange(String headerName, Number start, Number end) The value of the header with the given name in the request must not be in a range of values.static HeaderMatchvalueStartsWith(String headerName, String prefix) The value of the header with the given name in the request must start with the specified characters.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
HeaderMatch
protected HeaderMatch(software.amazon.jsii.JsiiObjectRef objRef) -
HeaderMatch
protected HeaderMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HeaderMatch
@Stability(Stable) protected HeaderMatch()
-
-
Method Details
-
valueDoesNotEndWith
@Stability(Stable) @NotNull public static HeaderMatch valueDoesNotEndWith(@NotNull String headerName, @NotNull String suffix) The value of the header with the given name in the request must not end with the specified characters.- Parameters:
headerName- the name of the header to match against. This parameter is required.suffix- The suffix to test against. This parameter is required.
-
valueDoesNotMatchRegex
@Stability(Stable) @NotNull public static HeaderMatch valueDoesNotMatchRegex(@NotNull String headerName, @NotNull String regex) The value of the header with the given name in the request must not include the specified characters.- Parameters:
headerName- the name of the header to match against. This parameter is required.regex- The regex to test against. This parameter is required.
-
valueDoesNotStartWith
@Stability(Stable) @NotNull public static HeaderMatch valueDoesNotStartWith(@NotNull String headerName, @NotNull String prefix) The value of the header with the given name in the request must not start with the specified characters.- Parameters:
headerName- the name of the header to match against. This parameter is required.prefix- The prefix to test against. This parameter is required.
-
valueEndsWith
@Stability(Stable) @NotNull public static HeaderMatch valueEndsWith(@NotNull String headerName, @NotNull String suffix) The value of the header with the given name in the request must end with the specified characters.- Parameters:
headerName- the name of the header to match against. This parameter is required.suffix- The suffix to test against. This parameter is required.
-
valueIs
@Stability(Stable) @NotNull public static HeaderMatch valueIs(@NotNull String headerName, @NotNull String headerValue) The value of the header with the given name in the request must match the specified value exactly.- Parameters:
headerName- the name of the header to match against. This parameter is required.headerValue- The exact value to test against. This parameter is required.
-
valueIsNot
@Stability(Stable) @NotNull public static HeaderMatch valueIsNot(@NotNull String headerName, @NotNull String headerValue) The value of the header with the given name in the request must not match the specified value exactly.- Parameters:
headerName- the name of the header to match against. This parameter is required.headerValue- The exact value to test against. This parameter is required.
-
valueMatchesRegex
@Stability(Stable) @NotNull public static HeaderMatch valueMatchesRegex(@NotNull String headerName, @NotNull String regex) The value of the header with the given name in the request must include the specified characters.- Parameters:
headerName- the name of the header to match against. This parameter is required.regex- The regex to test against. This parameter is required.
-
valuesIsInRange
@Stability(Stable) @NotNull public static HeaderMatch valuesIsInRange(@NotNull String headerName, @NotNull Number start, @NotNull Number end) The value of the header with the given name in the request must be in a range of values.- Parameters:
headerName- the name of the header to match against. This parameter is required.start- Match on values starting at and including this value. This parameter is required.end- Match on values up to but not including this value. This parameter is required.
-
valuesIsNotInRange
@Stability(Stable) @NotNull public static HeaderMatch valuesIsNotInRange(@NotNull String headerName, @NotNull Number start, @NotNull Number end) The value of the header with the given name in the request must not be in a range of values.- Parameters:
headerName- the name of the header to match against. This parameter is required.start- Match on values starting at and including this value. This parameter is required.end- Match on values up to but not including this value. This parameter is required.
-
valueStartsWith
@Stability(Stable) @NotNull public static HeaderMatch valueStartsWith(@NotNull String headerName, @NotNull String prefix) The value of the header with the given name in the request must start with the specified characters.- Parameters:
headerName- the name of the header to match against. This parameter is required.prefix- The prefix to test against. This parameter is required.
-
bind
Returns the header match configuration.- Parameters:
scope- This parameter is required.
-