GrpcGatewayRouteProperty Struct
An object that represents a gRPC gateway route.
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 grpcGatewayRouteProperty: appmesh.CfnGatewayRoute.GrpcGatewayRouteProperty = {
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',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appmesh as appmesh
grpc_gateway_route_property = appmesh.CfnGatewayRoute.GrpcGatewayRouteProperty(
action=appmesh.CfnGatewayRoute.GrpcGatewayRouteActionProperty(
target=appmesh.CfnGatewayRoute.GatewayRouteTargetProperty(
virtual_service=appmesh.CfnGatewayRoute.GatewayRouteVirtualServiceProperty(
virtual_service_name="virtualServiceName"
),
# the properties below are optional
port=123
),
# the properties below are optional
rewrite=appmesh.CfnGatewayRoute.GrpcGatewayRouteRewriteProperty(
hostname=appmesh.CfnGatewayRoute.GatewayRouteHostnameRewriteProperty(
default_target_hostname="defaultTargetHostname"
)
)
),
match=appmesh.CfnGatewayRoute.GrpcGatewayRouteMatchProperty(
hostname=appmesh.CfnGatewayRoute.GatewayRouteHostnameMatchProperty(
exact="exact",
suffix="suffix"
),
metadata=[appmesh.CfnGatewayRoute.GrpcGatewayRouteMetadataProperty(
name="name",
# the properties below are optional
invert=False,
match=appmesh.CfnGatewayRoute.GatewayRouteMetadataMatchProperty(
exact="exact",
prefix="prefix",
range=appmesh.CfnGatewayRoute.GatewayRouteRangeMatchProperty(
end=123,
start=123
),
regex="regex",
suffix="suffix"
)
)],
port=123,
service_name="serviceName"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appmesh.*;
GrpcGatewayRouteProperty grpcGatewayRouteProperty = GrpcGatewayRouteProperty.builder()
.action(GrpcGatewayRouteActionProperty.builder()
.target(GatewayRouteTargetProperty.builder()
.virtualService(GatewayRouteVirtualServiceProperty.builder()
.virtualServiceName("virtualServiceName")
.build())
// the properties below are optional
.port(123)
.build())
// the properties below are optional
.rewrite(GrpcGatewayRouteRewriteProperty.builder()
.hostname(GatewayRouteHostnameRewriteProperty.builder()
.defaultTargetHostname("defaultTargetHostname")
.build())
.build())
.build())
.match(GrpcGatewayRouteMatchProperty.builder()
.hostname(GatewayRouteHostnameMatchProperty.builder()
.exact("exact")
.suffix("suffix")
.build())
.metadata(List.of(GrpcGatewayRouteMetadataProperty.builder()
.name("name")
// the properties below are optional
.invert(false)
.match(GatewayRouteMetadataMatchProperty.builder()
.exact("exact")
.prefix("prefix")
.range(GatewayRouteRangeMatchProperty.builder()
.end(123)
.start(123)
.build())
.regex("regex")
.suffix("suffix")
.build())
.build()))
.port(123)
.serviceName("serviceName")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppMesh;
var grpcGatewayRouteProperty = new GrpcGatewayRouteProperty {
Action = new GrpcGatewayRouteActionProperty {
Target = new GatewayRouteTargetProperty {
VirtualService = new GatewayRouteVirtualServiceProperty {
VirtualServiceName = "virtualServiceName"
},
// the properties below are optional
Port = 123
},
// the properties below are optional
Rewrite = new GrpcGatewayRouteRewriteProperty {
Hostname = new GatewayRouteHostnameRewriteProperty {
DefaultTargetHostname = "defaultTargetHostname"
}
}
},
Match = new GrpcGatewayRouteMatchProperty {
Hostname = new GatewayRouteHostnameMatchProperty {
Exact = "exact",
Suffix = "suffix"
},
Metadata = new [] { new GrpcGatewayRouteMetadataProperty {
Name = "name",
// the properties below are optional
Invert = false,
Match = new GatewayRouteMetadataMatchProperty {
Exact = "exact",
Prefix = "prefix",
Range = new GatewayRouteRangeMatchProperty {
End = 123,
Start = 123
},
Regex = "regex",
Suffix = "suffix"
}
} },
Port = 123,
ServiceName = "serviceName"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
grpcGatewayRouteProperty := &GrpcGatewayRouteProperty{
Action: &GrpcGatewayRouteActionProperty{
Target: &GatewayRouteTargetProperty{
VirtualService: &GatewayRouteVirtualServiceProperty{
VirtualServiceName: jsii.String("virtualServiceName"),
},
// the properties below are optional
Port: jsii.Number(123),
},
// the properties below are optional
Rewrite: &GrpcGatewayRouteRewriteProperty{
Hostname: &GatewayRouteHostnameRewriteProperty{
DefaultTargetHostname: jsii.String("defaultTargetHostname"),
},
},
},
Match: &GrpcGatewayRouteMatchProperty{
Hostname: &GatewayRouteHostnameMatchProperty{
Exact: jsii.String("exact"),
Suffix: jsii.String("suffix"),
},
Metadata: []interface{}{
&GrpcGatewayRouteMetadataProperty{
Name: jsii.String("name"),
// the properties below are optional
Invert: jsii.Boolean(false),
Match: &GatewayRouteMetadataMatchProperty{
Exact: jsii.String("exact"),
Prefix: jsii.String("prefix"),
Range: &GatewayRouteRangeMatchProperty{
End: jsii.Number(123),
Start: jsii.Number(123),
},
Regex: jsii.String("regex"),
Suffix: jsii.String("suffix"),
},
},
},
Port: jsii.Number(123),
ServiceName: jsii.String("serviceName"),
},
}
Properties
actionIResolvable | CfnGatewayRoute.GrpcGatewayRouteActionPropertyactiontyping.Union[IResolvable, GrpcGatewayRouteActionProperty]actionIResolvableActionIResolvableActioninterface{}required#An object that represents the action to take if a match is determined.
matchIResolvable | CfnGatewayRoute.GrpcGatewayRouteMatchPropertymatchtyping.Union[IResolvable, GrpcGatewayRouteMatchProperty]matchIResolvableMatchIResolvableMatchinterface{}required#An object that represents the criteria for determining a request match.