Enum GrpcRetryEvent

java.lang.Object
java.lang.Enum<GrpcRetryEvent>
software.amazon.awscdk.services.appmesh.GrpcRetryEvent
All Implemented Interfaces:
Serializable, Comparable<GrpcRetryEvent>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:10.121Z") @Stability(Stable) public enum GrpcRetryEvent extends Enum<GrpcRetryEvent>
gRPC events.

Example:

 VirtualRouter router;
 VirtualNode node;
 router.addRoute("route-grpc-retry", RouteBaseProps.builder()
         .routeSpec(RouteSpec.grpc(GrpcRouteSpecOptions.builder()
                 .weightedTargets(List.of(WeightedTarget.builder().virtualNode(node).build()))
                 .match(GrpcRouteMatch.builder().serviceName("servicename").build())
                 .retryPolicy(GrpcRetryPolicy.builder()
                         .tcpRetryEvents(List.of(TcpRetryEvent.CONNECTION_ERROR))
                         .httpRetryEvents(List.of(HttpRetryEvent.GATEWAY_ERROR))
                         // Retry if gRPC responds that the request was cancelled, a resource
                         // was exhausted, or if the service is unavailable
                         .grpcRetryEvents(List.of(GrpcRetryEvent.CANCELLED, GrpcRetryEvent.RESOURCE_EXHAUSTED, GrpcRetryEvent.UNAVAILABLE))
                         .retryAttempts(5)
                         .retryTimeout(Duration.seconds(1))
                         .build())
                 .build()))
         .build());