Skip to content
v2.273.0

GatewayRouteSpecProperty Struct ​

An object that represents a gateway route specification.

Specify one gateway route type.

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 gatewayRouteSpecProperty: appmesh.CfnGatewayRoute.GatewayRouteSpecProperty = {
  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,
};

Properties ​

grpcRouteIResolvable | CfnGatewayRoute.GrpcGatewayRoutePropertygrpc_routetyping.Union[IResolvable, GrpcGatewayRouteProperty]grpcRouteIResolvableGrpcRouteIResolvableGrpcRouteinterface{}#
An object that represents the specification of a gRPC gateway route.
http2RouteIResolvable | CfnGatewayRoute.HttpGatewayRoutePropertyhttp2_routetyping.Union[IResolvable, HttpGatewayRouteProperty]http2RouteIResolvableHttp2RouteIResolvableHttp2Routeinterface{}#
An object that represents the specification of an HTTP/2 gateway route.
httpRouteIResolvable | CfnGatewayRoute.HttpGatewayRoutePropertyhttp_routetyping.Union[IResolvable, HttpGatewayRouteProperty]httpRouteIResolvableHttpRouteIResolvableHttpRouteinterface{}#
An object that represents the specification of an HTTP gateway route.
prioritynumberpriorityint | floatpriorityNumberPrioritydoublePriority*float64#
The ordering of the gateway routes spec.