aws-cdk-lib.aws_appmesh.CfnRouteProps

interface CfnRouteProps

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

Properties for defining a CfnRoute.

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 cfnRouteProps: appmesh.CfnRouteProps = {
  meshName: 'meshName',
  spec: {
    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,
        },
      },
    },
  },
  virtualRouterName: 'virtualRouterName',

  // the properties below are optional
  meshOwner: 'meshOwner',
  routeName: 'routeName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};

Properties

NameTypeDescription
meshNamestringThe name of the service mesh to create the route in.
specIResolvable | RouteSpecPropertyThe route specification to apply.
virtualRouterNamestringThe name of the virtual router in which to create the route.
meshOwner?stringThe AWS IAM account ID of the service mesh owner.
routeName?stringThe name to use for the route.
tags?CfnTag[]Optional metadata that you can apply to the route to assist with categorization and organization.

meshName

Type: string

The name of the service mesh to create the route in.


spec

Type: IResolvable | RouteSpecProperty

The route specification to apply.


virtualRouterName

Type: string

The name of the virtual router in which to create the route.

If the virtual router is in a shared mesh, then you must be the owner of the virtual router resource.


meshOwner?

Type: string (optional)

The AWS IAM account ID of the service mesh owner.

If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes .


routeName?

Type: string (optional)

The name to use for the route.


tags?

Type: CfnTag[] (optional)

Optional metadata that you can apply to the route to assist with categorization and organization.

Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.