Class HttpGatewayRouteMatch
The criterion for determining a request match for this GatewayRoute.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.AWS.AppMesh.dll
Syntax (csharp)
public class HttpGatewayRouteMatch : Object, IHttpGatewayRouteMatch
Syntax (vb)
Public Class HttpGatewayRouteMatch
Inherits Object
Implements IHttpGatewayRouteMatch
Remarks
ExampleMetadata: infused
Examples
VirtualGateway gateway;
VirtualService virtualService;
gateway.AddGatewayRoute("gateway-route-http-2", new GatewayRouteBaseProps {
RouteSpec = GatewayRouteSpec.Http(new HttpGatewayRouteSpecOptions {
RouteTarget = virtualService,
Match = new HttpGatewayRouteMatch {
// This rewrites the path from '/test' to '/rewrittenPath'.
Path = HttpGatewayRoutePathMatch.Exactly("/test", "/rewrittenPath")
}
})
});
Synopsis
Constructors
HttpGatewayRouteMatch() |
Properties
Headers | Specifies the client request headers to match on. |
Hostname | The gateway route host name to be matched on. |
Method | The method to match on. |
Path | Specify how to match requests based on the 'path' part of their URL. |
QueryParameters | The query parameters to match on. |
RewriteRequestHostname | When |
Constructors
HttpGatewayRouteMatch()
public HttpGatewayRouteMatch()
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 gateway route to match.
Default: - do not match on headers
Hostname
The gateway route host name to be matched on.
public GatewayRouteHostnameMatch Hostname { get; set; }
Property Value
Remarks
Default: - do not match on host name
Method
The method to match on.
public Nullable<HttpRouteMethod> Method { get; set; }
Property Value
System.Nullable<HttpRouteMethod>
Remarks
Default: - do not match on method
Path
Specify how to match requests based on the 'path' part of their URL.
public HttpGatewayRoutePathMatch Path { get; set; }
Property Value
Remarks
Default: - matches requests with any path
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
RewriteRequestHostname
When true
, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name.
public Nullable<bool> RewriteRequestHostname { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
When false
, retains the original hostname from the request.
Default: true