class QueryParameterMatch
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.QueryParameterMatch |
Java | software.amazon.awscdk.services.appmesh.QueryParameterMatch |
Python | aws_cdk.aws_appmesh.QueryParameterMatch |
TypeScript (source) | @aws-cdk/aws-appmesh » QueryParameterMatch |
Used to generate query parameter matching methods.
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')
],
},
}),
});
Initializer
new QueryParameterMatch()
Methods
Name | Description |
---|---|
bind(scope) | Returns the query parameter match configuration. |
static value | The value of the query parameter with the given name in the request must match the specified value exactly. |
bind(scope)
public bind(scope: Construct): QueryParameterMatchConfig
Parameters
- scope
Construct
Returns
Returns the query parameter match configuration.
Is(queryParameterName, queryParameterValue)
static valuepublic static valueIs(queryParameterName: string, queryParameterValue: string): QueryParameterMatch
Parameters
- queryParameterName
string
— the name of the query parameter to match against. - queryParameterValue
string
— The exact value to test against.
Returns
The value of the query parameter with the given name in the request must match the specified value exactly.