interface RouteSpecConfig
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.RouteSpecConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#RouteSpecConfig |
Java | software.amazon.awscdk.services.appmesh.RouteSpecConfig |
Python | aws_cdk.aws_appmesh.RouteSpecConfig |
TypeScript (source) | aws-cdk-lib » aws_appmesh » RouteSpecConfig |
Obtainable from
Route
.bind()
All Properties for Route Specs.
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 routeSpecConfig: appmesh.RouteSpecConfig = {
grpcRouteSpec: {
action: {
weightedTargets: [{
virtualNode: 'virtualNode',
weight: 123,
// the properties below are optional
port: 123,
}],
},
match: {
metadata: [{
name: 'name',
// the properties below are optional
invert: false,
match: {
exact: 'exact',
prefix: 'prefix',
range: {
end: 123,
start: 123,
},
regex: 'regex',
suffix: 'suffix',
},
}],
methodName: 'methodName',
port: 123,
serviceName: 'serviceName',
},
// the properties below are optional
retryPolicy: {
maxRetries: 123,
perRetryTimeout: {
unit: 'unit',
value: 123,
},
// the properties below are optional
grpcRetryEvents: ['grpcRetryEvents'],
httpRetryEvents: ['httpRetryEvents'],
tcpRetryEvents: ['tcpRetryEvents'],
},
timeout: {
idle: {
unit: 'unit',
value: 123,
},
perRequest: {
unit: 'unit',
value: 123,
},
},
},
http2RouteSpec: {
action: {
weightedTargets: [{
virtualNode: 'virtualNode',
weight: 123,
// the properties below are optional
port: 123,
}],
},
match: {
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',
},
// the properties below are optional
retryPolicy: {
maxRetries: 123,
perRetryTimeout: {
unit: 'unit',
value: 123,
},
// the properties below are optional
httpRetryEvents: ['httpRetryEvents'],
tcpRetryEvents: ['tcpRetryEvents'],
},
timeout: {
idle: {
unit: 'unit',
value: 123,
},
perRequest: {
unit: 'unit',
value: 123,
},
},
},
httpRouteSpec: {
action: {
weightedTargets: [{
virtualNode: 'virtualNode',
weight: 123,
// the properties below are optional
port: 123,
}],
},
match: {
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',
},
// the properties below are optional
retryPolicy: {
maxRetries: 123,
perRetryTimeout: {
unit: 'unit',
value: 123,
},
// the properties below are optional
httpRetryEvents: ['httpRetryEvents'],
tcpRetryEvents: ['tcpRetryEvents'],
},
timeout: {
idle: {
unit: 'unit',
value: 123,
},
perRequest: {
unit: 'unit',
value: 123,
},
},
},
priority: 123,
tcpRouteSpec: {
action: {
weightedTargets: [{
virtualNode: 'virtualNode',
weight: 123,
// the properties below are optional
port: 123,
}],
},
// the properties below are optional
match: {
port: 123,
},
timeout: {
idle: {
unit: 'unit',
value: 123,
},
},
},
};
Properties
Name | Type | Description |
---|---|---|
grpc | Grpc | The spec for a grpc route. |
http2 | Http | The spec for an http2 route. |
http | Http | The spec for an http route. |
priority? | number | The priority for the route. |
tcp | Tcp | The spec for a tcp route. |
grpcRouteSpec?
Type:
Grpc
(optional, default: no grpc spec)
The spec for a grpc route.
http2RouteSpec?
Type:
Http
(optional, default: no http2 spec)
The spec for an http2 route.
httpRouteSpec?
Type:
Http
(optional, default: no http spec)
The spec for an http route.
priority?
Type:
number
(optional, default: no particular priority)
The priority for the route.
When a Virtual Router has multiple routes, route match is performed in the order of specified value, where 0 is the highest priority, and first matched route is selected.
tcpRouteSpec?
Type:
Tcp
(optional, default: no tcp spec)
The spec for a tcp route.