aws-cdk-lib.aws_appmesh.QueryParameterMatch

class QueryParameterMatch

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.QueryParameterMatch
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#QueryParameterMatch
Javasoftware.amazon.awscdk.services.appmesh.QueryParameterMatch
Pythonaws_cdk.aws_appmesh.QueryParameterMatch
TypeScript (source)aws-cdk-lib » 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

NameDescription
bind(scope)Returns the query parameter match configuration.
static valueIs(queryParameterName, queryParameterValue)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

  • QueryParameterMatchConfig

Returns the query parameter match configuration.


static valueIs(queryParameterName, queryParameterValue)

public 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

  • QueryParameterMatch

The value of the query parameter with the given name in the request must match the specified value exactly.