Class HeaderMatch

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.appmesh.HeaderMatch
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.072Z") @Stability(Stable) public abstract class HeaderMatch extends software.amazon.jsii.JsiiObject
Used to generate header matching methods.

Example:

 VirtualRouter router;
 VirtualNode node;
 router.addRoute("route-http2", RouteBaseProps.builder()
         .routeSpec(RouteSpec.http2(HttpRouteSpecOptions.builder()
                 .weightedTargets(List.of(WeightedTarget.builder()
                         .virtualNode(node)
                         .build()))
                 .match(HttpRouteMatch.builder()
                         .path(HttpRoutePathMatch.exactly("/exact"))
                         .method(HttpRouteMethod.POST)
                         .protocol(HttpRouteProtocol.HTTPS)
                         .headers(List.of(HeaderMatch.valueIs("Content-Type", "application/json"), HeaderMatch.valueIsNot("Content-Type", "application/json")))
                         .queryParameters(List.of(QueryParameterMatch.valueIs("query-field", "value")))
                         .build())
                 .build()))
         .build());
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    HeaderMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    HeaderMatch(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(Construct scope)
    Returns the header match configuration.
    valueDoesNotEndWith(String headerName, String suffix)
    The value of the header with the given name in the request must not end with the specified characters.
    valueDoesNotMatchRegex(String headerName, String regex)
    The value of the header with the given name in the request must not include the specified characters.
    valueDoesNotStartWith(String headerName, String prefix)
    The value of the header with the given name in the request must not start with the specified characters.
    valueEndsWith(String headerName, String suffix)
    The value of the header with the given name in the request must end with the specified characters.
    valueIs(String headerName, String headerValue)
    The value of the header with the given name in the request must match the specified value exactly.
    valueIsNot(String headerName, String headerValue)
    The value of the header with the given name in the request must not match the specified value exactly.
    valueMatchesRegex(String headerName, String regex)
    The value of the header with the given name in the request must include the specified characters.
    valuesIsInRange(String headerName, Number start, Number end)
    The value of the header with the given name in the request must be in a range of values.
    valuesIsNotInRange(String headerName, Number start, Number end)
    The value of the header with the given name in the request must not be in a range of values.
    valueStartsWith(String headerName, String prefix)
    The value of the header with the given name in the request must start with the specified characters.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • HeaderMatch

      protected HeaderMatch(software.amazon.jsii.JsiiObjectRef objRef)
    • HeaderMatch

      protected HeaderMatch(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • HeaderMatch

      @Stability(Stable) protected HeaderMatch()
  • Method Details

    • valueDoesNotEndWith

      @Stability(Stable) @NotNull public static HeaderMatch valueDoesNotEndWith(@NotNull String headerName, @NotNull String suffix)
      The value of the header with the given name in the request must not end with the specified characters.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      suffix - The suffix to test against. This parameter is required.
    • valueDoesNotMatchRegex

      @Stability(Stable) @NotNull public static HeaderMatch valueDoesNotMatchRegex(@NotNull String headerName, @NotNull String regex)
      The value of the header with the given name in the request must not include the specified characters.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      regex - The regex to test against. This parameter is required.
    • valueDoesNotStartWith

      @Stability(Stable) @NotNull public static HeaderMatch valueDoesNotStartWith(@NotNull String headerName, @NotNull String prefix)
      The value of the header with the given name in the request must not start with the specified characters.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      prefix - The prefix to test against. This parameter is required.
    • valueEndsWith

      @Stability(Stable) @NotNull public static HeaderMatch valueEndsWith(@NotNull String headerName, @NotNull String suffix)
      The value of the header with the given name in the request must end with the specified characters.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      suffix - The suffix to test against. This parameter is required.
    • valueIs

      @Stability(Stable) @NotNull public static HeaderMatch valueIs(@NotNull String headerName, @NotNull String headerValue)
      The value of the header with the given name in the request must match the specified value exactly.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      headerValue - The exact value to test against. This parameter is required.
    • valueIsNot

      @Stability(Stable) @NotNull public static HeaderMatch valueIsNot(@NotNull String headerName, @NotNull String headerValue)
      The value of the header with the given name in the request must not match the specified value exactly.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      headerValue - The exact value to test against. This parameter is required.
    • valueMatchesRegex

      @Stability(Stable) @NotNull public static HeaderMatch valueMatchesRegex(@NotNull String headerName, @NotNull String regex)
      The value of the header with the given name in the request must include the specified characters.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      regex - The regex to test against. This parameter is required.
    • valuesIsInRange

      @Stability(Stable) @NotNull public static HeaderMatch valuesIsInRange(@NotNull String headerName, @NotNull Number start, @NotNull Number end)
      The value of the header with the given name in the request must be in a range of values.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      start - Match on values starting at and including this value. This parameter is required.
      end - Match on values up to but not including this value. This parameter is required.
    • valuesIsNotInRange

      @Stability(Stable) @NotNull public static HeaderMatch valuesIsNotInRange(@NotNull String headerName, @NotNull Number start, @NotNull Number end)
      The value of the header with the given name in the request must not be in a range of values.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      start - Match on values starting at and including this value. This parameter is required.
      end - Match on values up to but not including this value. This parameter is required.
    • valueStartsWith

      @Stability(Stable) @NotNull public static HeaderMatch valueStartsWith(@NotNull String headerName, @NotNull String prefix)
      The value of the header with the given name in the request must start with the specified characters.

      Parameters:
      headerName - the name of the header to match against. This parameter is required.
      prefix - The prefix to test against. This parameter is required.
    • bind

      @Stability(Stable) @NotNull public abstract HeaderMatchConfig bind(@NotNull Construct scope)
      Returns the header match configuration.

      Parameters:
      scope - This parameter is required.