Class HttpRouteMatch
The criterion for determining a request match for this Route.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HttpRouteMatch : Object, IHttpRouteMatch
Syntax (vb)
Public Class HttpRouteMatch
Inherits Object
Implements IHttpRouteMatch
Remarks
ExampleMetadata: infused
Examples
VirtualRouter router;
VirtualNode node;
router.AddRoute("route-http", new RouteBaseProps {
RouteSpec = RouteSpec.Http(new HttpRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget {
VirtualNode = node,
Weight = 50
}, new WeightedTarget {
VirtualNode = node,
Weight = 50
} },
Match = new HttpRouteMatch {
Path = HttpRoutePathMatch.StartsWith("/path-to-app")
}
})
});
Synopsis
Constructors
HttpRouteMatch() |
Properties
Headers | Specifies the client request headers to match on. |
Method | The HTTP client request method to match on. |
Path | Specifies how is the request matched based on the path part of its URL. |
Port | The port to match from the request. |
Protocol | The client request protocol to match on. |
QueryParameters | The query parameters to match on. |
Constructors
HttpRouteMatch()
public HttpRouteMatch()
Properties
Headers
Specifies the client request headers to match on.
public HeaderMatch[] Headers { get; set; }
Property Value
Remarks
All specified headers must match for the route to match.
Default: - do not match on headers
Method
The HTTP client request method to match on.
public Nullable<HttpRouteMethod> Method { get; set; }
Property Value
System.Nullable<HttpRouteMethod>
Remarks
Default: - do not match on request method
Path
Specifies how is the request matched based on the path part of its URL.
public HttpRoutePathMatch Path { get; set; }
Property Value
Remarks
Default: - matches requests with all paths
Port
The port to match from the request.
public Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - do not match on port
Protocol
The client request protocol to match on.
public Nullable<HttpRouteProtocol> Protocol { get; set; }
Property Value
System.Nullable<HttpRouteProtocol>
Remarks
Applicable only for HTTP2 routes.
Default: - do not match on HTTP2 request protocol
QueryParameters
The query parameters to match on.
public QueryParameterMatch[] QueryParameters { get; set; }
Property Value
Remarks
All specified query parameters must match for the route to match.
Default: - do not match on query parameters