@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:48.617Z")
public abstract class HttpRoutePathMatch
extends software.amazon.jsii.JsiiObject
Example:
VirtualRouter router; VirtualNode node; router.addRoute("route-http", RouteBaseProps.builder() .routeSpec(RouteSpec.http(HttpRouteSpecOptions.builder() .weightedTargets(List.of(WeightedTarget.builder() .virtualNode(node) .weight(50) .build(), WeightedTarget.builder() .virtualNode(node) .weight(50) .build())) .match(HttpRouteMatch.builder() .path(HttpRoutePathMatch.startsWith("/path-to-app")) .build()) .build())) .build());
Modifier | Constructor and Description |
---|---|
protected |
HttpRoutePathMatch() |
protected |
HttpRoutePathMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
HttpRoutePathMatch(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
abstract HttpRoutePathMatchConfig |
bind(Construct scope)
Returns the route path match configuration.
|
static HttpRoutePathMatch |
exactly(java.lang.String path)
The value of the path must match the specified value exactly.
|
static HttpRoutePathMatch |
regex(java.lang.String regex)
The value of the path must match the specified regex.
|
static HttpRoutePathMatch |
startsWith(java.lang.String prefix)
The value of the path must match the specified prefix.
|
protected HttpRoutePathMatch(software.amazon.jsii.JsiiObjectRef objRef)
protected HttpRoutePathMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected HttpRoutePathMatch()
public static HttpRoutePathMatch exactly(java.lang.String path)
The provided path
must start with the '/' character.
path
- the exact path to match on. This parameter is required.public static HttpRoutePathMatch regex(java.lang.String regex)
regex
- the regex used to match the path. This parameter is required.public static HttpRoutePathMatch startsWith(java.lang.String prefix)
prefix
- the value to use to match the beginning of the path part of the URL of the request. This parameter is required.public abstract HttpRoutePathMatchConfig bind(Construct scope)
scope
- This parameter is required.