# HttpRoutePathMatch

Defines HTTP route matching based on the URL path of the request.

- Source: [`aws-appmesh/lib/http-route-path-match.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appmesh/lib/http-route-path-match.ts#L28)

## Example

```ts
declare const router: appmesh.VirtualRouter;
declare const node: appmesh.VirtualNode;

router.addRoute('route-http', {
  routeSpec: appmesh.RouteSpec.http({
    weightedTargets: [
      {
        virtualNode: node,
        weight: 50,
      },
      {
        virtualNode: node,
        weight: 50,
      },
    ],
    match: {
      path: appmesh.HttpRoutePathMatch.startsWith('/path-to-app'),
    },
  }),
});
```

## Initializer

```ts
new HttpRoutePathMatch()
```

## Methods

- `bind(scope: Construct): HttpRoutePathMatchConfig` — Returns the route path match configuration.

- `exactly(path: string): HttpRoutePathMatch // chainable` (static) — The value of the path must match the specified value exactly.

  The provided `path` must start with the '/' character.

  **Parameters**

  - `path` — the exact path to match on.

- `regex(regex: string): HttpRoutePathMatch // chainable` (static) — The value of the path must match the specified regex.

  **Parameters**

  - `regex` — the regex used to match the path.

- `startsWith(prefix: string): HttpRoutePathMatch // chainable` (static) — The value of the path must match the specified prefix.

  **Parameters**

  - `prefix` — the value to use to match the beginning of the path part of the URL of the request.
