enum HttpRouteMethod
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.HttpRouteMethod |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#HttpRouteMethod |
Java | software.amazon.awscdk.services.appmesh.HttpRouteMethod |
Python | aws_cdk.aws_appmesh.HttpRouteMethod |
TypeScript (source) | aws-cdk-lib » aws_appmesh » HttpRouteMethod |
Supported values for matching routes based on the HTTP request method.
Example
declare const router: appmesh.VirtualRouter;
declare const node: appmesh.VirtualNode;
router.addRoute('route-http2', {
routeSpec: appmesh.RouteSpec.http2({
weightedTargets: [
{
virtualNode: node,
},
],
match: {
path: appmesh.HttpRoutePathMatch.exactly('/exact'),
method: appmesh.HttpRouteMethod.POST,
protocol: appmesh.HttpRouteProtocol.HTTPS,
headers: [
// All specified headers must match for the route to match.
appmesh.HeaderMatch.valueIs('Content-Type', 'application/json'),
appmesh.HeaderMatch.valueIsNot('Content-Type', 'application/json'),
],
queryParameters: [
// All specified query parameters must match for the route to match.
appmesh.QueryParameterMatch.valueIs('query-field', 'value')
],
},
}),
});
Members
Name | Description |
---|---|
GET | GET request. |
HEAD | HEAD request. |
POST | POST request. |
PUT | PUT request. |
DELETE | DELETE request. |
CONNECT | CONNECT request. |
OPTIONS | OPTIONS request. |
TRACE | TRACE request. |
PATCH | PATCH request. |
GET
GET request.
HEAD
HEAD request.
POST
POST request.
PUT
PUT request.
DELETE
DELETE request.
CONNECT
CONNECT request.
OPTIONS
OPTIONS request.
TRACE
TRACE request.
PATCH
PATCH request.