Class: AWSCDK::APIGatewayv2::HttpRouteKey
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::APIGatewayv2::HttpRouteKey
- Defined in:
- api_gatewayv2/http_route_key.rb
Overview
HTTP route in APIGateway is a combination of the HTTP method and the path component.
This class models that combination.
Class Method Summary collapse
-
.DEFAULT ⇒ AWSCDK::APIGatewayv2::HttpRouteKey
The catch-all route of the API, i.e., when no other routes match.
- .jsii_overridable_methods ⇒ Object
-
.with(path, method = nil) ⇒ AWSCDK::APIGatewayv2::HttpRouteKey
Create a route key with the combination of the path and the method.
Instance Method Summary collapse
-
#initialize(*args) ⇒ HttpRouteKey
constructor
A new instance of HttpRouteKey.
-
#key ⇒ String
The key to the RouteKey as recognized by APIGateway.
-
#method ⇒ AWSCDK::APIGatewayv2::HttpMethod
The method of the route.
-
#path ⇒ String?
The path part of this RouteKey.
Constructor Details
#initialize(*args) ⇒ HttpRouteKey
Returns a new instance of HttpRouteKey.
10 11 12 |
# File 'api_gatewayv2/http_route_key.rb', line 10 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_apigatewayv2.HttpRouteKey does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.DEFAULT ⇒ AWSCDK::APIGatewayv2::HttpRouteKey
The catch-all route of the API, i.e., when no other routes match.
36 37 38 |
# File 'api_gatewayv2/http_route_key.rb', line 36 def self.DEFAULT() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_apigatewayv2.HttpRouteKey", "DEFAULT") end |
.jsii_overridable_methods ⇒ Object
14 15 16 17 18 19 20 |
# File 'api_gatewayv2/http_route_key.rb', line 14 def self.jsii_overridable_methods { :key => { kind: :property, name: "key", is_optional: false }, :method => { kind: :property, name: "method", is_optional: false }, :path => { kind: :property, name: "path", is_optional: true }, } end |
.with(path, method = nil) ⇒ AWSCDK::APIGatewayv2::HttpRouteKey
Create a route key with the combination of the path and the method.
27 28 29 30 31 |
# File 'api_gatewayv2/http_route_key.rb', line 27 def self.with(path, method = nil) Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") Jsii::Type.check_type(method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkh0dHBNZXRob2QifQ==")), "method") unless method.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_apigatewayv2.HttpRouteKey", "with", [path, method]) end |
Instance Method Details
#key ⇒ String
The key to the RouteKey as recognized by APIGateway.
43 44 45 |
# File 'api_gatewayv2/http_route_key.rb', line 43 def key() jsii_get_property("key") end |
#method ⇒ AWSCDK::APIGatewayv2::HttpMethod
The method of the route.
50 51 52 |
# File 'api_gatewayv2/http_route_key.rb', line 50 def method() jsii_get_property("method") end |
#path ⇒ String?
The path part of this RouteKey.
Returns undefined when RouteKey.DEFAULT is used.
59 60 61 |
# File 'api_gatewayv2/http_route_key.rb', line 59 def path() jsii_get_property("path") end |