interface HttpRouteMatchProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppMesh.CfnRoute.HttpRouteMatchProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#CfnRoute_HttpRouteMatchProperty |
![]() | software.amazon.awscdk.services.appmesh.CfnRoute.HttpRouteMatchProperty |
![]() | aws_cdk.aws_appmesh.CfnRoute.HttpRouteMatchProperty |
![]() | aws-cdk-lib » aws_appmesh » CfnRoute » HttpRouteMatchProperty |
An object that represents the requirements for a route to match HTTP requests for a virtual router.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const httpRouteMatchProperty: appmesh.CfnRoute.HttpRouteMatchProperty = {
headers: [{
name: 'name',
// the properties below are optional
invert: false,
match: {
exact: 'exact',
prefix: 'prefix',
range: {
end: 123,
start: 123,
},
regex: 'regex',
suffix: 'suffix',
},
}],
method: 'method',
path: {
exact: 'exact',
regex: 'regex',
},
port: 123,
prefix: 'prefix',
queryParameters: [{
name: 'name',
// the properties below are optional
match: {
exact: 'exact',
},
}],
scheme: 'scheme',
};
Properties
Name | Type | Description |
---|---|---|
headers? | IResolvable | IResolvable | Http [] | The client request headers to match on. |
method? | string | The client request method to match on. |
path? | IResolvable | Http | The client request path to match on. |
port? | number | The port number to match on. |
prefix? | string | Specifies the path to match requests with. |
query | IResolvable | IResolvable | Query [] | The client request query parameters to match on. |
scheme? | string | The client request scheme to match on. |
headers?
Type:
IResolvable
|
IResolvable
|
Http
[]
(optional)
The client request headers to match on.
method?
Type:
string
(optional)
The client request method to match on.
Specify only one.
path?
Type:
IResolvable
|
Http
(optional)
The client request path to match on.
port?
Type:
number
(optional)
The port number to match on.
prefix?
Type:
string
(optional)
Specifies the path to match requests with.
This parameter must always start with /
, which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local
and you want the route to match requests to my-service.local/metrics
, your prefix should be /metrics
.
queryParameters?
Type:
IResolvable
|
IResolvable
|
Query
[]
(optional)
The client request query parameters to match on.
scheme?
Type:
string
(optional)
The client request scheme to match on.
Specify only one. Applicable only for HTTP2 routes.