aws-cdk-lib.aws_appmesh.CfnRoute.RouteSpecProperty

interface RouteSpecProperty

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.CfnRoute.RouteSpecProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#CfnRoute_RouteSpecProperty
Javasoftware.amazon.awscdk.services.appmesh.CfnRoute.RouteSpecProperty
Pythonaws_cdk.aws_appmesh.CfnRoute.RouteSpecProperty
TypeScript aws-cdk-lib » aws_appmesh » CfnRoute » RouteSpecProperty

An object that represents a route specification.

Specify one route type.

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 routeSpecProperty: appmesh.CfnRoute.RouteSpecProperty = {
  grpcRoute: {
    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,
      },
    },
  },
  http2Route: {
    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,
      },
    },
  },
  httpRoute: {
    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,
  tcpRoute: {
    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
grpcRoute?IResolvable | GrpcRoutePropertyAn object that represents the specification of a gRPC route.
http2Route?IResolvable | HttpRoutePropertyAn object that represents the specification of an HTTP/2 route.
httpRoute?IResolvable | HttpRoutePropertyAn object that represents the specification of an HTTP route.
priority?numberThe priority for the route.
tcpRoute?IResolvable | TcpRoutePropertyAn object that represents the specification of a TCP route.

grpcRoute?

Type: IResolvable | GrpcRouteProperty (optional)

An object that represents the specification of a gRPC route.


http2Route?

Type: IResolvable | HttpRouteProperty (optional)

An object that represents the specification of an HTTP/2 route.


httpRoute?

Type: IResolvable | HttpRouteProperty (optional)

An object that represents the specification of an HTTP route.


priority?

Type: number (optional)

The priority for the route.

Routes are matched based on the specified value, where 0 is the highest priority.


tcpRoute?

Type: IResolvable | TcpRouteProperty (optional)

An object that represents the specification of a TCP route.