interface GatewayRouteSpecConfig
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppMesh.GatewayRouteSpecConfig |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#GatewayRouteSpecConfig |
![]() | software.amazon.awscdk.services.appmesh.GatewayRouteSpecConfig |
![]() | aws_cdk.aws_appmesh.GatewayRouteSpecConfig |
![]() | aws-cdk-lib » aws_appmesh » GatewayRouteSpecConfig |
Obtainable from
Gateway
.bind()
All Properties for GatewayRoute 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 gatewayRouteSpecConfig: appmesh.GatewayRouteSpecConfig = {
grpcSpecConfig: {
action: {
target: {
virtualService: {
virtualServiceName: 'virtualServiceName',
},
// the properties below are optional
port: 123,
},
// the properties below are optional
rewrite: {
hostname: {
defaultTargetHostname: 'defaultTargetHostname',
},
},
},
match: {
hostname: {
exact: 'exact',
suffix: 'suffix',
},
metadata: [{
name: 'name',
// the properties below are optional
invert: false,
match: {
exact: 'exact',
prefix: 'prefix',
range: {
end: 123,
start: 123,
},
regex: 'regex',
suffix: 'suffix',
},
}],
port: 123,
serviceName: 'serviceName',
},
},
http2SpecConfig: {
action: {
target: {
virtualService: {
virtualServiceName: 'virtualServiceName',
},
// the properties below are optional
port: 123,
},
// the properties below are optional
rewrite: {
hostname: {
defaultTargetHostname: 'defaultTargetHostname',
},
path: {
exact: 'exact',
},
prefix: {
defaultPrefix: 'defaultPrefix',
value: 'value',
},
},
},
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',
},
}],
hostname: {
exact: 'exact',
suffix: 'suffix',
},
method: 'method',
path: {
exact: 'exact',
regex: 'regex',
},
port: 123,
prefix: 'prefix',
queryParameters: [{
name: 'name',
// the properties below are optional
match: {
exact: 'exact',
},
}],
},
},
httpSpecConfig: {
action: {
target: {
virtualService: {
virtualServiceName: 'virtualServiceName',
},
// the properties below are optional
port: 123,
},
// the properties below are optional
rewrite: {
hostname: {
defaultTargetHostname: 'defaultTargetHostname',
},
path: {
exact: 'exact',
},
prefix: {
defaultPrefix: 'defaultPrefix',
value: 'value',
},
},
},
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',
},
}],
hostname: {
exact: 'exact',
suffix: 'suffix',
},
method: 'method',
path: {
exact: 'exact',
regex: 'regex',
},
port: 123,
prefix: 'prefix',
queryParameters: [{
name: 'name',
// the properties below are optional
match: {
exact: 'exact',
},
}],
},
},
priority: 123,
};
Properties
Name | Type | Description |
---|---|---|
grpc | Grpc | The spec for a grpc gateway route. |
http2 | Http | The spec for an http2 gateway route. |
http | Http | The spec for an http gateway route. |
priority? | number | The priority for the gateway route. |
grpcSpecConfig?
Type:
Grpc
(optional, default: no grpc spec)
The spec for a grpc gateway route.
http2SpecConfig?
Type:
Http
(optional, default: no http2 spec)
The spec for an http2 gateway route.
httpSpecConfig?
Type:
Http
(optional, default: no http spec)
The spec for an http gateway route.
priority?
Type:
number
(optional, default: no particular priority)
The priority for the gateway route.
When a Virtual Gateway has multiple gateway routes, gateway route match is performed in the order of specified value, where 0 is the highest priority, and first matched gateway route is selected.