Class QueryParameterMatch
Used to generate query parameter matching methods.
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class QueryParameterMatch : DeputyBase
Syntax (vb)
Public MustInherit Class QueryParameterMatch Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
VirtualRouter router;
VirtualNode node;
router.AddRoute("route-http2", new RouteBaseProps {
RouteSpec = RouteSpec.Http2(new HttpRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget {
VirtualNode = node
} },
Match = new HttpRouteMatch {
Path = HttpRoutePathMatch.Exactly("/exact"),
Method = HttpRouteMethod.POST,
Protocol = HttpRouteProtocol.HTTPS,
Headers = new [] { HeaderMatch.ValueIs("Content-Type", "application/json"), HeaderMatch.ValueIsNot("Content-Type", "application/json") },
QueryParameters = new [] { QueryParameterMatch.ValueIs("query-field", "value") }
}
})
});
Synopsis
Constructors
| QueryParameterMatch() | Used to generate query parameter matching methods. |
Methods
| Bind(Construct) | Returns the query parameter match configuration. |
| ValueIs(string, string) | The value of the query parameter with the given name in the request must match the specified value exactly. |
Constructors
QueryParameterMatch()
Used to generate query parameter matching methods.
protected QueryParameterMatch()
Remarks
ExampleMetadata: infused
Examples
VirtualRouter router;
VirtualNode node;
router.AddRoute("route-http2", new RouteBaseProps {
RouteSpec = RouteSpec.Http2(new HttpRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget {
VirtualNode = node
} },
Match = new HttpRouteMatch {
Path = HttpRoutePathMatch.Exactly("/exact"),
Method = HttpRouteMethod.POST,
Protocol = HttpRouteProtocol.HTTPS,
Headers = new [] { HeaderMatch.ValueIs("Content-Type", "application/json"), HeaderMatch.ValueIsNot("Content-Type", "application/json") },
QueryParameters = new [] { QueryParameterMatch.ValueIs("query-field", "value") }
}
})
});
Methods
Bind(Construct)
Returns the query parameter match configuration.
public abstract IQueryParameterMatchConfig Bind(Construct scope)
Parameters
- scope Construct
Returns
Remarks
ExampleMetadata: infused
ValueIs(string, string)
The value of the query parameter with the given name in the request must match the specified value exactly.
public static QueryParameterMatch ValueIs(string queryParameterName, string queryParameterValue)
Parameters
- queryParameterName string
the name of the query parameter to match against.
- queryParameterValue string
The exact value to test against.
Returns
Remarks
ExampleMetadata: infused