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.
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.
GatewayRouteHostnameMatch? Hostname { get; }
Property Value
Remarks
Default: - do not match on host name
Method
The method to match on.
HttpRouteMethod? Method { get; }
Property Value
Remarks
Default: - do not match on method
Path
Specify how to match requests based on the 'path' part of their URL.
HttpGatewayRoutePathMatch? Path { get; }
Property Value
Remarks
Default: - matches requests with any path
Port
The port number to match on.
double? Port { get; }
Property Value
Remarks
Default: - no default port
QueryParameters
The query parameters to match on.
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.
bool? RewriteRequestHostname { get; }
Property Value
bool?
Remarks
When false, retains the original hostname from the request.
Default: true