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.98.0 (build 00b106d)", date="2024-05-08T21:35:02.697Z") @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());
 
  • 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 path must 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

      @Stability(Stable) @NotNull public static HttpGatewayRoutePathMatch exactly(@NotNull String path)
      The value of the path must match the specified value exactly.

      The provided path must 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

      @Stability(Stable) @NotNull public static HttpGatewayRoutePathMatch regex(@NotNull String 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.