enum GrpcRetryEvent
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.AppMesh.GrpcRetryEvent |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#GrpcRetryEvent |
![]() | software.amazon.awscdk.services.appmesh.GrpcRetryEvent |
![]() | aws_cdk.aws_appmesh.GrpcRetryEvent |
![]() | 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
Name | Description |
---|---|
CANCELLED | Request was cancelled. |
DEADLINE_EXCEEDED | The deadline was exceeded. |
INTERNAL_ERROR | Internal error. |
RESOURCE_EXHAUSTED | A resource was exhausted. |
UNAVAILABLE | The 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