Class HttpRouteKey
(experimental) HTTP route in APIGateway is a combination of the HTTP method and the path component.
Inheritance
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public class HttpRouteKey : DeputyBase
Syntax (vb)
Public Class HttpRouteKey
Inherits DeputyBase
Remarks
This class models that combination.
Stability: Experimental
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGatewayv2;
var httpRouteKey = HttpRouteKey.With("path", HttpMethod.ANY);
Synopsis
Constructors
HttpRouteKey(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HttpRouteKey(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
DEFAULT | (experimental) The catch-all route of the API, i.e., when no other routes match. |
Key | (experimental) The key to the RouteKey as recognized by APIGateway. |
Method | (experimental) The method of the route. |
Path | (experimental) The path part of this RouteKey. |
Methods
With(String, Nullable<HttpMethod>) | (experimental) Create a route key with the combination of the path and the method. |
Constructors
HttpRouteKey(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HttpRouteKey(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HttpRouteKey(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HttpRouteKey(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
DEFAULT
(experimental) The catch-all route of the API, i.e., when no other routes match.
public static HttpRouteKey DEFAULT { get; }
Property Value
Remarks
Stability: Experimental
Key
(experimental) The key to the RouteKey as recognized by APIGateway.
public virtual string Key { get; }
Property Value
System.String
Remarks
Stability: Experimental
Method
(experimental) The method of the route.
public virtual HttpMethod Method { get; }
Property Value
Remarks
Stability: Experimental
Path
(experimental) The path part of this RouteKey.
public virtual string Path { get; }
Property Value
System.String
Remarks
Returns undefined
when RouteKey.DEFAULT
is used.
Stability: Experimental
Methods
With(String, Nullable<HttpMethod>)
(experimental) Create a route key with the combination of the path and the method.
public static HttpRouteKey With(string path, Nullable<HttpMethod> method = null)
Parameters
- path System.String
- method System.Nullable<HttpMethod>
default is 'ANY'.
Returns
Remarks
Stability: Experimental