GrpcRouteSpecOptions
- class aws_cdk.aws_appmesh.GrpcRouteSpecOptions(*, priority=None, match, weighted_targets, retry_policy=None, timeout=None)
Bases:
RouteSpecOptionsBase
Properties specific for a GRPC Based Routes.
- Parameters:
priority (
Union
[int
,float
,None
]) – 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. Default: - no particular prioritymatch (
Union
[GrpcRouteMatch
,Dict
[str
,Any
]]) – The criterion for determining a request match for this Route.weighted_targets (
Sequence
[Union
[WeightedTarget
,Dict
[str
,Any
]]]) – List of targets that traffic is routed to when a request matches the route.retry_policy (
Union
[GrpcRetryPolicy
,Dict
[str
,Any
],None
]) – The retry policy. Default: - no retry policytimeout (
Union
[GrpcTimeout
,Dict
[str
,Any
],None
]) – An object that represents a grpc timeout. Default: - None
- ExampleMetadata:
infused
Example:
# router: appmesh.VirtualRouter # node: appmesh.VirtualNode router.add_route("route-grpc-retry", route_spec=appmesh.RouteSpec.grpc( weighted_targets=[appmesh.WeightedTarget(virtual_node=node)], match=appmesh.GrpcRouteMatch( # When method name is specified, service name must be also specified. method_name="methodname", service_name="servicename", metadata=[ # All specified metadata must match for the route to match. appmesh.HeaderMatch.value_starts_with("Content-Type", "application/"), appmesh.HeaderMatch.value_does_not_start_with("Content-Type", "text/") ] ) ) )
Attributes
- match
The criterion for determining a request match for this Route.
- 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.
- Default:
no particular priority
- retry_policy
The retry policy.
- Default:
no retry policy
- timeout
An object that represents a grpc timeout.
- Default:
None
- weighted_targets
List of targets that traffic is routed to when a request matches the route.