Interface IHttpGatewayRouteMatch
The criterion for determining a request match for this GatewayRoute.
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IHttpGatewayRouteMatch
Syntax (vb)
Public Interface 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
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. |
Port | The port number to match on. |
QueryParameters | The query parameters to match on. |
RewriteRequestHostname | When |
Properties
Headers
Specifies the client request headers to match on.
virtual HeaderMatch[] Headers { get; }
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.
virtual GatewayRouteHostnameMatch Hostname { get; }
Property Value
Remarks
Default: - do not match on host name
Method
The method to match on.
virtual Nullable<HttpRouteMethod> Method { get; }
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.
virtual HttpGatewayRoutePathMatch Path { get; }
Property Value
Remarks
Default: - matches requests with any path
Port
The port number to match on.
virtual Nullable<double> Port { get; }
Property Value
System.Nullable<System.Double>
Remarks
Default: - no default port
QueryParameters
The query parameters to match on.
virtual QueryParameterMatch[] QueryParameters { get; }
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.
virtual Nullable<bool> RewriteRequestHostname { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
When false
, retains the original hostname from the request.
Default: true