Class HttpGatewayRoutePathMatch
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appmesh.HttpGatewayRoutePathMatch
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:32.348Z")
@Stability(Stable)
public abstract class HttpGatewayRoutePathMatch
extends software.amazon.jsii.JsiiObject
Defines HTTP gateway route matching based on the URL path of the request.
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());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedHttpGatewayRoutePathMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedHttpGatewayRoutePathMatch(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionabstract HttpGatewayRoutePathMatchConfigbind(software.constructs.Construct scope) Returns the gateway route path match configuration.static HttpGatewayRoutePathMatchThe value of the path must match the specified value exactly.static HttpGatewayRoutePathMatchThe value of the path must match the specified value exactly.static HttpGatewayRoutePathMatchThe value of the path must match the specified regex.static HttpGatewayRoutePathMatchThe value of the path must match the specified regex.static HttpGatewayRoutePathMatchstartsWith(String prefix) The value of the path must match the specified prefix.static HttpGatewayRoutePathMatchstartsWith(String prefix, String rewriteTo) The value of the path must match the specified prefix.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
-
HttpGatewayRoutePathMatch
protected HttpGatewayRoutePathMatch(software.amazon.jsii.JsiiObjectRef objRef) -
HttpGatewayRoutePathMatch
protected HttpGatewayRoutePathMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HttpGatewayRoutePathMatch
@Stability(Stable) protected HttpGatewayRoutePathMatch()
-
-
Method Details
-
exactly
@Stability(Stable) @NotNull public static HttpGatewayRoutePathMatch exactly(@NotNull String path, @Nullable String rewriteTo) The value of the path must match the specified value exactly.The provided
pathmust start with the '/' character.- Parameters:
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.
-
exactly
The value of the path must match the specified value exactly.The provided
pathmust start with the '/' character.- Parameters:
path- the exact path to match on. This parameter is required.
-
regex
@Stability(Stable) @NotNull public static HttpGatewayRoutePathMatch regex(@NotNull String regex, @Nullable String rewriteTo) The value of the path must match the specified regex.- Parameters:
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.
-
regex
The value of the path must match the specified regex.- Parameters:
regex- the regex used to match the path. This parameter is required.
-
startsWith
@Stability(Stable) @NotNull public static HttpGatewayRoutePathMatch startsWith(@NotNull String prefix, @Nullable String rewriteTo) The value of the path must match the specified prefix.- Parameters:
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.
-
startsWith
@Stability(Stable) @NotNull public static HttpGatewayRoutePathMatch startsWith(@NotNull String prefix) The value of the path must match the specified prefix.- Parameters:
prefix- the value to use to match the beginning of the path part of the URL of the request. This parameter is required.
-
bind
@Stability(Stable) @NotNull public abstract HttpGatewayRoutePathMatchConfig bind(@NotNull software.constructs.Construct scope) Returns the gateway route path match configuration.- Parameters:
scope- This parameter is required.
-