Interface HttpRouteMatch

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
HttpRouteMatch.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:10.148Z") @Stability(Stable) public interface HttpRouteMatch extends software.amazon.jsii.JsiiSerializable
The criterion for determining a request match for this Route.

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());
 
  • Method Details

    • getHeaders

      @Stability(Stable) @Nullable default List<HeaderMatch> getHeaders()
      Specifies the client request headers to match on.

      All specified headers must match for the route to match.

      Default: - do not match on headers

    • getMethod

      @Stability(Stable) @Nullable default HttpRouteMethod getMethod()
      The HTTP client request method to match on.

      Default: - do not match on request method

    • getPath

      @Stability(Stable) @Nullable default HttpRoutePathMatch getPath()
      Specifies how is the request matched based on the path part of its URL.

      Default: - matches requests with all paths

    • getPort

      @Stability(Stable) @Nullable default Number getPort()
      The port to match from the request.

      Default: - do not match on port

    • getProtocol

      @Stability(Stable) @Nullable default HttpRouteProtocol getProtocol()
      The client request protocol to match on.

      Applicable only for HTTP2 routes.

      Default: - do not match on HTTP2 request protocol

    • getQueryParameters

      @Stability(Stable) @Nullable default List<QueryParameterMatch> getQueryParameters()
      The query parameters to match on.

      All specified query parameters must match for the route to match.

      Default: - do not match on query parameters

    • builder

      @Stability(Stable) static HttpRouteMatch.Builder builder()
      Returns:
      a HttpRouteMatch.Builder of HttpRouteMatch