QueryParameterMatch Class
Used to generate query parameter matching methods.
Example
ts
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
ts
new QueryParameterMatch()
python
QueryParameterMatch()
java
new QueryParameterMatch()
csharp
new QueryParameterMatch()
go
NewQueryParameterMatch()
Methods
bind(scope: Construct): QueryParameterMatchConfigdef bind(self, scope: Construct) -> QueryParameterMatchConfigpublic QueryParameterMatchConfig bind(Construct scope)public QueryParameterMatchConfig Bind(Construct scope)func Bind(Scope Construct) QueryParameterMatchConfig#Returns the query parameter match configuration.
valueIs(queryParameterName: string, queryParameterValue: string): QueryParameterMatch // chainable@staticmethod def value_is(query_parameter_name: str, query_parameter_value: str) -> QueryParameterMatchpublic static QueryParameterMatch valueIs(String queryParameterName, String queryParameterValue)public static QueryParameterMatch ValueIs(string queryParameterName, string queryParameterValue)func ValueIs(QueryParameterName *string, QueryParameterValue *string) QueryParameterMatchstatic#The value of the query parameter with the given name in the request must match the specified value exactly.
2 parameters
Parameters
queryParameterNamequery_parameter_namequeryParameterNamequeryParameterNameQueryParameterName— the name of the query parameter to match against.queryParameterValuequery_parameter_valuequeryParameterValuequeryParameterValueQueryParameterValue— The exact value to test against.