aws-cdk-lib.aws_appmesh.RouteBaseProps

interface RouteBaseProps

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

Base interface properties for all Routes.

Example

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

router.addRoute('route-http2-retry', {
  routeSpec: appmesh.RouteSpec.http2({
    weightedTargets: [{ virtualNode: node }],
    retryPolicy: {
      // Retry if the connection failed
      tcpRetryEvents: [appmesh.TcpRetryEvent.CONNECTION_ERROR],
      // Retry if HTTP responds with a gateway error (502, 503, 504)
      httpRetryEvents: [appmesh.HttpRetryEvent.GATEWAY_ERROR],
      // Retry five times
      retryAttempts: 5,
      // Use a 1 second timeout per retry
      retryTimeout: Duration.seconds(1),
    },
  }),
});

Properties

NameTypeDescription
routeSpecRouteSpecProtocol specific spec.
routeName?stringThe name of the route.

routeSpec

Type: RouteSpec

Protocol specific spec.


routeName?

Type: string (optional, default: An automatically generated name)

The name of the route.