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.116.0 (build 0eddcff)",
           date="2025-10-29T11:15:31.722Z")
@Stability(Stable)
public class HttpRouteKey
extends software.amazon.jsii.JsiiObject
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 SummaryNested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationMode
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HttpRouteKeyThe catch-all route of the API, i.e., when no other routes match.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedHttpRouteKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedHttpRouteKey(software.amazon.jsii.JsiiObjectRef objRef) 
- 
Method SummaryModifier and TypeMethodDescriptiongetKey()The key to the RouteKey as recognized by APIGateway.The method of the route.getPath()The path part of this RouteKey.static HttpRouteKeyCreate a route key with the combination of the path and the method.static HttpRouteKeywith(String path, HttpMethod method) Create a route key with the combination of the path and the method.Methods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
DEFAULTThe catch-all route of the API, i.e., when no other routes match.
 
- 
- 
Constructor Details- 
HttpRouteKeyprotected HttpRouteKey(software.amazon.jsii.JsiiObjectRef objRef) 
- 
HttpRouteKeyprotected HttpRouteKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
 
- 
- 
Method Details- 
with@Stability(Stable) @NotNull public static HttpRouteKey with(@NotNull String path, @Nullable HttpMethod method) Create a route key with the combination of the path and the method.- Parameters:
- path- This parameter is required.
- method- default is 'ANY'.
 
- 
withCreate a route key with the combination of the path and the method.- Parameters:
- path- This parameter is required.
 
- 
getKeyThe key to the RouteKey as recognized by APIGateway.
- 
getMethodThe method of the route.
- 
getPathThe path part of this RouteKey.Returns undefinedwhenRouteKey.DEFAULTis used.
 
-