aws-cdk-lib.aws_appmesh.GrpcRetryEvent

enum GrpcRetryEvent

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.GrpcRetryEvent
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#GrpcRetryEvent
Javasoftware.amazon.awscdk.services.appmesh.GrpcRetryEvent
Pythonaws_cdk.aws_appmesh.GrpcRetryEvent
TypeScript (source)aws-cdk-lib » aws_appmesh » GrpcRetryEvent

gRPC events.

Example

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

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

CANCELLED

Request was cancelled.

See also: https://grpc.github.io/grpc/core/md_doc_statuscodes.html


DEADLINE_EXCEEDED

The deadline was exceeded.

See also: https://grpc.github.io/grpc/core/md_doc_statuscodes.html


INTERNAL_ERROR

Internal error.

See also: https://grpc.github.io/grpc/core/md_doc_statuscodes.html


RESOURCE_EXHAUSTED

A resource was exhausted.

See also: https://grpc.github.io/grpc/core/md_doc_statuscodes.html


UNAVAILABLE

The service is unavailable.

See also: https://grpc.github.io/grpc/core/md_doc_statuscodes.html