class GatewayRouteSpec
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.GatewayRouteSpec |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#GatewayRouteSpec |
Java | software.amazon.awscdk.services.appmesh.GatewayRouteSpec |
Python | aws_cdk.aws_appmesh.GatewayRouteSpec |
TypeScript (source) | aws-cdk-lib » aws_appmesh » GatewayRouteSpec |
Used to generate specs with different protocols for a GatewayRoute.
Example
declare const gateway: appmesh.VirtualGateway;
declare const virtualService: appmesh.VirtualService;
gateway.addGatewayRoute('gateway-route-grpc', {
routeSpec: appmesh.GatewayRouteSpec.grpc({
routeTarget: virtualService,
match: {
hostname: appmesh.GatewayRouteHostnameMatch.exactly('example.com'),
// This disables the default rewrite to virtual service name and retain original request.
rewriteRequestHostname: false,
},
}),
});
Initializer
new GatewayRouteSpec()
Methods
Name | Description |
---|---|
bind(scope) | Called when the GatewayRouteSpec type is initialized. |
static grpc(options) | Creates an gRPC Based GatewayRoute. |
static http(options) | Creates an HTTP Based GatewayRoute. |
static http2(options) | Creates an HTTP2 Based GatewayRoute. |
bind(scope)
public bind(scope: Construct): GatewayRouteSpecConfig
Parameters
- scope
Construct
Returns
Called when the GatewayRouteSpec type is initialized.
Can be used to enforce mutual exclusivity with future properties
static grpc(options)
public static grpc(options: GrpcGatewayRouteSpecOptions): GatewayRouteSpec
Parameters
- options
Grpc
— - no grpc gateway route.Gateway Route Spec Options
Returns
Creates an gRPC Based GatewayRoute.
static http(options)
public static http(options: HttpGatewayRouteSpecOptions): GatewayRouteSpec
Parameters
- options
Http
— - no http gateway route.Gateway Route Spec Options
Returns
Creates an HTTP Based GatewayRoute.
static http2(options)
public static http2(options: HttpGatewayRouteSpecOptions): GatewayRouteSpec
Parameters
- options
Http
— - no http2 gateway route.Gateway Route Spec Options
Returns
Creates an HTTP2 Based GatewayRoute.