Class GrpcRouteMatch
The criterion for determining a request match for this Route.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class GrpcRouteMatch : IGrpcRouteMatch
  Syntax (vb)
Public Class GrpcRouteMatch Implements IGrpcRouteMatch
  Remarks
At least one match type must be selected.
ExampleMetadata: infused
Examples
VirtualRouter router;
             VirtualNode node;
             router.AddRoute("route-grpc-retry", new RouteBaseProps {
                 RouteSpec = RouteSpec.Grpc(new GrpcRouteSpecOptions {
                     WeightedTargets = new [] { new WeightedTarget { VirtualNode = node } },
                     Match = new GrpcRouteMatch {
                         // When method name is specified, service name must be also specified.
                         MethodName = "methodname",
                         ServiceName = "servicename",
                         Metadata = new [] { HeaderMatch.ValueStartsWith("Content-Type", "application/"), HeaderMatch.ValueDoesNotStartWith("Content-Type", "text/") }
                     }
                 })
             });
  Synopsis
Constructors
| GrpcRouteMatch() | The criterion for determining a request match for this Route.  | 
      
Properties
| Metadata | Create metadata based gRPC route match.  | 
      
| MethodName | The method name to match from the request.  | 
      
| Port | The port to match from the request.  | 
      
| ServiceName | Create service name based gRPC route match.  | 
      
Constructors
GrpcRouteMatch()
The criterion for determining a request match for this Route.
public GrpcRouteMatch()
  Remarks
At least one match type must be selected.
ExampleMetadata: infused
Examples
VirtualRouter router;
             VirtualNode node;
             router.AddRoute("route-grpc-retry", new RouteBaseProps {
                 RouteSpec = RouteSpec.Grpc(new GrpcRouteSpecOptions {
                     WeightedTargets = new [] { new WeightedTarget { VirtualNode = node } },
                     Match = new GrpcRouteMatch {
                         // When method name is specified, service name must be also specified.
                         MethodName = "methodname",
                         ServiceName = "servicename",
                         Metadata = new [] { HeaderMatch.ValueStartsWith("Content-Type", "application/"), HeaderMatch.ValueDoesNotStartWith("Content-Type", "text/") }
                     }
                 })
             });
  Properties
Metadata
Create metadata based gRPC route match.
public HeaderMatch[]? Metadata { get; set; }
  Property Value
Remarks
All specified metadata must match for the route to match.
Default: - do not match on metadata
MethodName
The method name to match from the request.
public string? MethodName { get; set; }
  Property Value
Remarks
If the method name is specified, service name must be also provided.
Default: - do not match on method name
Port
The port to match from the request.
public double? Port { get; set; }
  Property Value
Remarks
Default: - do not match on port
ServiceName
Create service name based gRPC route match.
public string? ServiceName { get; set; }
  Property Value
Remarks
Default: - do not match on service name