aws-cdk-lib.aws_appmesh.CfnGatewayRouteProps

interface CfnGatewayRouteProps

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

Properties for defining a CfnGatewayRoute.

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 cfnGatewayRouteProps: appmesh.CfnGatewayRouteProps = {
  meshName: 'meshName',
  spec: {
    grpcRoute: {
      action: {
        target: {
          virtualService: {
            virtualServiceName: 'virtualServiceName',
          },

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

        // the properties below are optional
        rewrite: {
          hostname: {
            defaultTargetHostname: 'defaultTargetHostname',
          },
        },
      },
      match: {
        hostname: {
          exact: 'exact',
          suffix: 'suffix',
        },
        metadata: [{
          name: 'name',

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

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

        // the properties below are optional
        rewrite: {
          hostname: {
            defaultTargetHostname: 'defaultTargetHostname',
          },
          path: {
            exact: 'exact',
          },
          prefix: {
            defaultPrefix: 'defaultPrefix',
            value: 'value',
          },
        },
      },
      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',
          },
        }],
        hostname: {
          exact: 'exact',
          suffix: 'suffix',
        },
        method: 'method',
        path: {
          exact: 'exact',
          regex: 'regex',
        },
        port: 123,
        prefix: 'prefix',
        queryParameters: [{
          name: 'name',

          // the properties below are optional
          match: {
            exact: 'exact',
          },
        }],
      },
    },
    httpRoute: {
      action: {
        target: {
          virtualService: {
            virtualServiceName: 'virtualServiceName',
          },

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

        // the properties below are optional
        rewrite: {
          hostname: {
            defaultTargetHostname: 'defaultTargetHostname',
          },
          path: {
            exact: 'exact',
          },
          prefix: {
            defaultPrefix: 'defaultPrefix',
            value: 'value',
          },
        },
      },
      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',
          },
        }],
        hostname: {
          exact: 'exact',
          suffix: 'suffix',
        },
        method: 'method',
        path: {
          exact: 'exact',
          regex: 'regex',
        },
        port: 123,
        prefix: 'prefix',
        queryParameters: [{
          name: 'name',

          // the properties below are optional
          match: {
            exact: 'exact',
          },
        }],
      },
    },
    priority: 123,
  },
  virtualGatewayName: 'virtualGatewayName',

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

Properties

NameTypeDescription
meshNamestringThe name of the service mesh that the resource resides in.
specIResolvable | GatewayRouteSpecPropertyThe specifications of the gateway route.
virtualGatewayNamestringThe virtual gateway that the gateway route is associated with.
gatewayRouteName?stringThe name of the gateway route.
meshOwner?stringThe AWS IAM account ID of the service mesh owner.
tags?CfnTag[]Optional metadata that you can apply to the gateway route to assist with categorization and organization.

meshName

Type: string

The name of the service mesh that the resource resides in.


spec

Type: IResolvable | GatewayRouteSpecProperty

The specifications of the gateway route.


virtualGatewayName

Type: string

The virtual gateway that the gateway route is associated with.


gatewayRouteName?

Type: string (optional)

The name of the gateway route.


meshOwner?

Type: string (optional)

The AWS IAM account ID of the service mesh owner.

If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes .


tags?

Type: CfnTag[] (optional)

Optional metadata that you can apply to the gateway 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.