aws-cdk-lib.aws_appmesh.RouteSpecConfig

interface RouteSpecConfig

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

Obtainable from RouteSpec.bind()

All Properties for Route Specs.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const routeSpecConfig: appmesh.RouteSpecConfig = {
  grpcRouteSpec: {
    action: {
      weightedTargets: [{
        virtualNode: 'virtualNode',
        weight: 123,

        // the properties below are optional
        port: 123,
      }],
    },
    match: {
      metadata: [{
        name: 'name',

        // the properties below are optional
        invert: false,
        match: {
          exact: 'exact',
          prefix: 'prefix',
          range: {
            end: 123,
            start: 123,
          },
          regex: 'regex',
          suffix: 'suffix',
        },
      }],
      methodName: 'methodName',
      port: 123,
      serviceName: 'serviceName',
    },

    // the properties below are optional
    retryPolicy: {
      maxRetries: 123,
      perRetryTimeout: {
        unit: 'unit',
        value: 123,
      },

      // the properties below are optional
      grpcRetryEvents: ['grpcRetryEvents'],
      httpRetryEvents: ['httpRetryEvents'],
      tcpRetryEvents: ['tcpRetryEvents'],
    },
    timeout: {
      idle: {
        unit: 'unit',
        value: 123,
      },
      perRequest: {
        unit: 'unit',
        value: 123,
      },
    },
  },
  http2RouteSpec: {
    action: {
      weightedTargets: [{
        virtualNode: 'virtualNode',
        weight: 123,

        // the properties below are optional
        port: 123,
      }],
    },
    match: {
      headers: [{
        name: 'name',

        // the properties below are optional
        invert: false,
        match: {
          exact: 'exact',
          prefix: 'prefix',
          range: {
            end: 123,
            start: 123,
          },
          regex: 'regex',
          suffix: 'suffix',
        },
      }],
      method: 'method',
      path: {
        exact: 'exact',
        regex: 'regex',
      },
      port: 123,
      prefix: 'prefix',
      queryParameters: [{
        name: 'name',

        // the properties below are optional
        match: {
          exact: 'exact',
        },
      }],
      scheme: 'scheme',
    },

    // the properties below are optional
    retryPolicy: {
      maxRetries: 123,
      perRetryTimeout: {
        unit: 'unit',
        value: 123,
      },

      // the properties below are optional
      httpRetryEvents: ['httpRetryEvents'],
      tcpRetryEvents: ['tcpRetryEvents'],
    },
    timeout: {
      idle: {
        unit: 'unit',
        value: 123,
      },
      perRequest: {
        unit: 'unit',
        value: 123,
      },
    },
  },
  httpRouteSpec: {
    action: {
      weightedTargets: [{
        virtualNode: 'virtualNode',
        weight: 123,

        // the properties below are optional
        port: 123,
      }],
    },
    match: {
      headers: [{
        name: 'name',

        // the properties below are optional
        invert: false,
        match: {
          exact: 'exact',
          prefix: 'prefix',
          range: {
            end: 123,
            start: 123,
          },
          regex: 'regex',
          suffix: 'suffix',
        },
      }],
      method: 'method',
      path: {
        exact: 'exact',
        regex: 'regex',
      },
      port: 123,
      prefix: 'prefix',
      queryParameters: [{
        name: 'name',

        // the properties below are optional
        match: {
          exact: 'exact',
        },
      }],
      scheme: 'scheme',
    },

    // the properties below are optional
    retryPolicy: {
      maxRetries: 123,
      perRetryTimeout: {
        unit: 'unit',
        value: 123,
      },

      // the properties below are optional
      httpRetryEvents: ['httpRetryEvents'],
      tcpRetryEvents: ['tcpRetryEvents'],
    },
    timeout: {
      idle: {
        unit: 'unit',
        value: 123,
      },
      perRequest: {
        unit: 'unit',
        value: 123,
      },
    },
  },
  priority: 123,
  tcpRouteSpec: {
    action: {
      weightedTargets: [{
        virtualNode: 'virtualNode',
        weight: 123,

        // the properties below are optional
        port: 123,
      }],
    },

    // the properties below are optional
    match: {
      port: 123,
    },
    timeout: {
      idle: {
        unit: 'unit',
        value: 123,
      },
    },
  },
};

Properties

NameTypeDescription
grpcRouteSpec?GrpcRoutePropertyThe spec for a grpc route.
http2RouteSpec?HttpRoutePropertyThe spec for an http2 route.
httpRouteSpec?HttpRoutePropertyThe spec for an http route.
priority?numberThe priority for the route.
tcpRouteSpec?TcpRoutePropertyThe spec for a tcp route.

grpcRouteSpec?

Type: GrpcRouteProperty (optional, default: no grpc spec)

The spec for a grpc route.


http2RouteSpec?

Type: HttpRouteProperty (optional, default: no http2 spec)

The spec for an http2 route.


httpRouteSpec?

Type: HttpRouteProperty (optional, default: no http spec)

The spec for an http route.


priority?

Type: number (optional, default: no particular priority)

The priority for the route.

When a Virtual Router has multiple routes, route match is performed in the order of specified value, where 0 is the highest priority, and first matched route is selected.


tcpRouteSpec?

Type: TcpRouteProperty (optional, default: no tcp spec)

The spec for a tcp route.