Skip to content
v2.274.0

GrpcRetryEvent Enum ​

gRPC events.

Example ​

ts
declare const router: appmesh.VirtualRouter;
declare const node: appmesh.VirtualNode;

router.addRoute('route-grpc-retry', {
  routeSpec: appmesh.RouteSpec.grpc({
    weightedTargets: [{ virtualNode: node }],
    match: { serviceName: 'servicename' },
    retryPolicy: {
      tcpRetryEvents: [appmesh.TcpRetryEvent.CONNECTION_ERROR],
      httpRetryEvents: [appmesh.HttpRetryEvent.GATEWAY_ERROR],
      // Retry if gRPC responds that the request was cancelled, a resource
      // was exhausted, or if the service is unavailable
      grpcRetryEvents: [
        appmesh.GrpcRetryEvent.CANCELLED,
        appmesh.GrpcRetryEvent.RESOURCE_EXHAUSTED,
        appmesh.GrpcRetryEvent.UNAVAILABLE,
      ],
      retryAttempts: 5,
      retryTimeout: Duration.seconds(1),
    },
  }),
});

Members ​

MemberDescription
CANCELLEDRequest was cancelled.
DEADLINE_EXCEEDEDThe deadline was exceeded.
INTERNAL_ERRORInternal error.
RESOURCE_EXHAUSTEDA resource was exhausted.
UNAVAILABLEThe service is unavailable.

Referenced by ​

  • GrpcRetryPolicy.grpcRetryEventsgrpc_retry_eventsgrpcRetryEventsGrpcRetryEventsGrpcRetryEvents