@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-28T21:34:27.830Z")
public abstract class HttpGatewayRoutePathMatch
extends software.amazon.jsii.JsiiObject
Example:
VirtualGateway gateway; VirtualService virtualService; gateway.addGatewayRoute("gateway-route-http-2", GatewayRouteBaseProps.builder() .routeSpec(GatewayRouteSpec.http(HttpGatewayRouteSpecOptions.builder() .routeTarget(virtualService) .match(HttpGatewayRouteMatch.builder() // This rewrites the path from '/test' to '/rewrittenPath'. .path(HttpGatewayRoutePathMatch.exactly("/test", "/rewrittenPath")) .build()) .build())) .build());
Modifier | Constructor and Description |
---|---|
protected |
HttpGatewayRoutePathMatch() |
protected |
HttpGatewayRoutePathMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
HttpGatewayRoutePathMatch(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
abstract HttpGatewayRoutePathMatchConfig |
bind(Construct scope)
Returns the gateway route path match configuration.
|
static HttpGatewayRoutePathMatch |
exactly(java.lang.String path)
The value of the path must match the specified value exactly.
|
static HttpGatewayRoutePathMatch |
exactly(java.lang.String path,
java.lang.String rewriteTo)
The value of the path must match the specified value exactly.
|
static HttpGatewayRoutePathMatch |
regex(java.lang.String regex)
The value of the path must match the specified regex.
|
static HttpGatewayRoutePathMatch |
regex(java.lang.String regex,
java.lang.String rewriteTo)
The value of the path must match the specified regex.
|
static HttpGatewayRoutePathMatch |
startsWith(java.lang.String prefix)
The value of the path must match the specified prefix.
|
static HttpGatewayRoutePathMatch |
startsWith(java.lang.String prefix,
java.lang.String rewriteTo)
The value of the path must match the specified prefix.
|
protected HttpGatewayRoutePathMatch(software.amazon.jsii.JsiiObjectRef objRef)
protected HttpGatewayRoutePathMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected HttpGatewayRoutePathMatch()
public static HttpGatewayRoutePathMatch exactly(java.lang.String path, java.lang.String rewriteTo)
The provided path
must start with the '/' character.
path
- the exact path to match on. This parameter is required.rewriteTo
- the value to substitute for the matched part of the path of the gateway request URL As a default, retains original request's URL path.public static HttpGatewayRoutePathMatch 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 HttpGatewayRoutePathMatch regex(java.lang.String regex, java.lang.String rewriteTo)
regex
- the regex used to match the path. This parameter is required.rewriteTo
- the value to substitute for the matched part of the path of the gateway request URL As a default, retains original request's URL path.public static HttpGatewayRoutePathMatch regex(java.lang.String regex)
regex
- the regex used to match the path. This parameter is required.public static HttpGatewayRoutePathMatch startsWith(java.lang.String prefix, java.lang.String rewriteTo)
prefix
- the value to use to match the beginning of the path part of the URL of the request. This parameter is required.rewriteTo
- Specify either disabling automatic rewrite or rewriting to specified prefix path.public static HttpGatewayRoutePathMatch 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 HttpGatewayRoutePathMatchConfig bind(Construct scope)
scope
- This parameter is required.