aws-cdk-lib.aws_appmesh.CfnRoute.HttpRouteMatchProperty

interface HttpRouteMatchProperty

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

An object that represents the requirements for a route to match HTTP requests for a virtual router.

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 httpRouteMatchProperty: appmesh.CfnRoute.HttpRouteMatchProperty = {
  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',
};

Properties

NameTypeDescription
headers?IResolvable | IResolvable | HttpRouteHeaderProperty[]The client request headers to match on.
method?stringThe client request method to match on.
path?IResolvable | HttpPathMatchPropertyThe client request path to match on.
port?numberThe port number to match on.
prefix?stringSpecifies the path to match requests with.
queryParameters?IResolvable | IResolvable | QueryParameterProperty[]The client request query parameters to match on.
scheme?stringThe client request scheme to match on.

headers?

Type: IResolvable | IResolvable | HttpRouteHeaderProperty[] (optional)

The client request headers to match on.


method?

Type: string (optional)

The client request method to match on.

Specify only one.


path?

Type: IResolvable | HttpPathMatchProperty (optional)

The client request path to match on.


port?

Type: number (optional)

The port number to match on.


prefix?

Type: string (optional)

Specifies the path to match requests with.

This parameter must always start with / , which by itself matches all requests to the virtual service name. You can also match for path-based routing of requests. For example, if your virtual service name is my-service.local and you want the route to match requests to my-service.local/metrics , your prefix should be /metrics .


queryParameters?

Type: IResolvable | IResolvable | QueryParameterProperty[] (optional)

The client request query parameters to match on.


scheme?

Type: string (optional)

The client request scheme to match on.

Specify only one. Applicable only for HTTP2 routes.