Skip to content

Commit

Permalink
feat(appmesh): add missing route match features (#13350)
Browse files Browse the repository at this point in the history
Adds route priority, header matching and matching by scheme and method.

Closes #11645

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
misterjoshua authored Mar 11, 2021
1 parent a4dcce2 commit b71efd9
Show file tree
Hide file tree
Showing 6 changed files with 778 additions and 18 deletions.
24 changes: 24 additions & 0 deletions packages/@aws-cdk/aws-appmesh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,30 @@ router.addRoute('route-http', {
});
```

Add an HTTP2 route that matches based on method, scheme and header:

```ts
router.addRoute('route-http2', {
routeSpec: appmesh.RouteSpec.http2({
weightedTargets: [
{
virtualNode: node,
},
],
match: {
prefixPath: '/',
method: appmesh.HttpRouteMatchMethod.POST,
protocol: appmesh.HttpRouteProtocol.HTTPS,
headers: [
// All specified headers must match for the route to match.
appmesh.HttpHeaderMatch.valueIs('Content-Type', 'application/json'),
appmesh.HttpHeaderMatch.valueIsNot('Content-Type', 'application/json'),
]
},
}),
});
```

Add a single route with multiple targets and split traffic 50/50

```ts
Expand Down
Loading

0 comments on commit b71efd9

Please sign in to comment.