RouteSpecConfig Struct
All Properties for Route Specs.
Example
ts
// 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
grpcRouteSpecCfnRoute.GrpcRoutePropertygrpc_route_specGrpcRoutePropertygrpcRouteSpecGrpcRoutePropertyGrpcRouteSpecGrpcRoutePropertyGrpcRouteSpecGrpcRouteProperty= no grpc spec#The spec for a grpc route.
http2RouteSpecCfnRoute.HttpRoutePropertyhttp2_route_specHttpRoutePropertyhttp2RouteSpecHttpRoutePropertyHttp2RouteSpecHttpRoutePropertyHttp2RouteSpecHttpRouteProperty= no http2 spec#The spec for an http2 route.
httpRouteSpecCfnRoute.HttpRoutePropertyhttp_route_specHttpRoutePropertyhttpRouteSpecHttpRoutePropertyHttpRouteSpecHttpRoutePropertyHttpRouteSpecHttpRouteProperty= no http spec#The spec for an http route.
prioritynumberpriorityint | floatpriorityNumberPrioritydoublePriority*float64= 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.
tcpRouteSpecCfnRoute.TcpRoutePropertytcp_route_specTcpRoutePropertytcpRouteSpecTcpRoutePropertyTcpRouteSpecTcpRoutePropertyTcpRouteSpecTcpRouteProperty= no tcp spec#The spec for a tcp route.