Class HttpRouteKey

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.HttpRouteKey
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.289Z") @Stability(Experimental) public class HttpRouteKey extends software.amazon.jsii.JsiiObject
(experimental) HTTP route in APIGateway is a combination of the HTTP method and the path component.

This class models that combination.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.apigatewayv2.*;
 HttpRouteKey httpRouteKey = HttpRouteKey.with("path", HttpMethod.ANY);
 
  • Nested Class Summary

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final HttpRouteKey
    (experimental) The catch-all route of the API, i.e., when no other routes match.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    (experimental) The key to the RouteKey as recognized by APIGateway.
    (experimental) The method of the route.
    (experimental) The path part of this RouteKey.
    with(String path)
    (experimental) Create a route key with the combination of the path and the method.
    with(String path, HttpMethod method)
    (experimental) Create a route key with the combination of the path and the method.

    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
  • Field Details

    • DEFAULT

      @Stability(Experimental) public static final HttpRouteKey DEFAULT
      (experimental) The catch-all route of the API, i.e., when no other routes match.
  • Constructor Details

    • HttpRouteKey

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

      protected HttpRouteKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • with

      @Stability(Experimental) @NotNull public static HttpRouteKey with(@NotNull String path, @Nullable HttpMethod method)
      (experimental) Create a route key with the combination of the path and the method.

      Parameters:
      path - This parameter is required.
      method - default is 'ANY'.
    • with

      @Stability(Experimental) @NotNull public static HttpRouteKey with(@NotNull String path)
      (experimental) Create a route key with the combination of the path and the method.

      Parameters:
      path - This parameter is required.
    • getKey

      @Stability(Experimental) @NotNull public String getKey()
      (experimental) The key to the RouteKey as recognized by APIGateway.
    • getMethod

      @Stability(Experimental) @NotNull public HttpMethod getMethod()
      (experimental) The method of the route.
    • getPath

      @Stability(Experimental) @Nullable public String getPath()
      (experimental) The path part of this RouteKey.

      Returns undefined when RouteKey.DEFAULT is used.