interface HttpGatewayRouteMatch
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppMesh.HttpGatewayRouteMatch |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#HttpGatewayRouteMatch |
![]() | software.amazon.awscdk.services.appmesh.HttpGatewayRouteMatch |
![]() | aws_cdk.aws_appmesh.HttpGatewayRouteMatch |
![]() | aws-cdk-lib » aws_appmesh » HttpGatewayRouteMatch |
The criterion for determining a request match for this GatewayRoute.
Example
declare const gateway: appmesh.VirtualGateway;
declare const virtualService: appmesh.VirtualService;
gateway.addGatewayRoute('gateway-route-http-2', {
routeSpec: appmesh.GatewayRouteSpec.http({
routeTarget: virtualService,
match: {
// This rewrites the path from '/test' to '/rewrittenPath'.
path: appmesh.HttpGatewayRoutePathMatch.exactly('/test', '/rewrittenPath'),
},
}),
});
Properties
Name | Type | Description |
---|---|---|
headers? | Header [] | Specifies the client request headers to match on. |
hostname? | Gateway | The gateway route host name to be matched on. |
method? | Http | The method to match on. |
path? | Http | Specify how to match requests based on the 'path' part of their URL. |
port? | number | The port number to match on. |
query | Query [] | The query parameters to match on. |
rewrite | boolean | When true , rewrites the original request received at the Virtual Gateway to the destination Virtual Service name. |
headers?
Type:
Header
[]
(optional, default: do not match on headers)
Specifies the client request headers to match on.
All specified headers must match for the gateway route to match.
hostname?
Type:
Gateway
(optional, default: do not match on host name)
The gateway route host name to be matched on.
method?
Type:
Http
(optional, default: do not match on method)
The method to match on.
path?
Type:
Http
(optional, default: matches requests with any path)
Specify how to match requests based on the 'path' part of their URL.
port?
Type:
number
(optional, default: no default port)
The port number to match on.
queryParameters?
Type:
Query
[]
(optional, default: do not match on query parameters)
The query parameters to match on.
All specified query parameters must match for the route to match.
rewriteRequestHostname?
Type:
boolean
(optional, default: true)
When true
, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name.
When false
, retains the original hostname from the request.