Skip to content
v2.273.0

CfnGatewayRouteProps Struct ​

Properties for defining a CfnGatewayRoute.

Example ​

ts
// 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 ​

gatewayRouteNamestringgateway_route_namestrgatewayRouteNameStringGatewayRouteNamestringGatewayRouteName*string#
The name of the gateway route.
meshNamestringmesh_namestrmeshNameStringMeshNamestringMeshName*stringrequired#
The name of the service mesh that the resource resides in.
meshOwnerstringmesh_ownerstrmeshOwnerStringMeshOwnerstringMeshOwner*string#
The AWS IAM account ID of the service mesh owner.
notes

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 .

The specifications of the gateway route.
tagsCfnTag[]tagstyping.List[CfnTag]tagsList<CfnTag>TagsCfnTag[]Tags*[]CfnTag#
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.

virtualGatewayNamestringvirtual_gateway_namestrvirtualGatewayNameStringVirtualGatewayNamestringVirtualGatewayName*stringrequired#
The virtual gateway that the gateway route is associated with.

Used as props by ​