Class: AWSCDK::AppMesh::HttpRouteMatch
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::HttpRouteMatch
- Defined in:
- app_mesh/http_route_match.rb
Overview
The criterion for determining a request match for this Route.
Instance Attribute Summary collapse
-
#headers ⇒ Array<AWSCDK::AppMesh::HeaderMatch>?
readonly
Specifies the client request headers to match on.
-
#method ⇒ AWSCDK::AppMesh::HttpRouteMethod?
readonly
The HTTP client request method to match on.
-
#path ⇒ AWSCDK::AppMesh::HttpRoutePathMatch?
readonly
Specifies how is the request matched based on the path part of its URL.
-
#port ⇒ Numeric?
readonly
The port to match from the request.
-
#protocol ⇒ AWSCDK::AppMesh::HttpRouteProtocol?
readonly
The client request protocol to match on.
-
#query_parameters ⇒ Array<AWSCDK::AppMesh::QueryParameterMatch>?
readonly
The query parameters to match on.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(headers: nil, method: nil, path: nil, port: nil, protocol: nil, query_parameters: nil) ⇒ HttpRouteMatch
constructor
A new instance of HttpRouteMatch.
- #to_jsii ⇒ Object
Constructor Details
#initialize(headers: nil, method: nil, path: nil, port: nil, protocol: nil, query_parameters: nil) ⇒ HttpRouteMatch
Returns a new instance of HttpRouteMatch.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app_mesh/http_route_match.rb', line 13 def initialize(headers: nil, method: nil, path: nil, port: nil, protocol: nil, query_parameters: nil) @headers = headers Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkhlYWRlck1hdGNoIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "headers") unless @headers.nil? @method = method Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5IdHRwUm91dGVNZXRob2QifQ==")), "method") unless @method.nil? @path = path Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5IdHRwUm91dGVQYXRoTWF0Y2gifQ==")), "path") unless @path.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil? @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5IdHRwUm91dGVQcm90b2NvbCJ9")), "protocol") unless @protocol.nil? @query_parameters = query_parameters Jsii::Type.check_type(@query_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLlF1ZXJ5UGFyYW1ldGVyTWF0Y2gifSwia2luZCI6ImFycmF5In19")), "queryParameters") unless @query_parameters.nil? end |
Instance Attribute Details
#headers ⇒ Array<AWSCDK::AppMesh::HeaderMatch>? (readonly)
Default: - do not match on headers
Specifies the client request headers to match on.
All specified headers must match for the route to match.
35 36 37 |
# File 'app_mesh/http_route_match.rb', line 35 def headers @headers end |
#method ⇒ AWSCDK::AppMesh::HttpRouteMethod? (readonly)
Default: - do not match on request method
The HTTP client request method to match on.
40 41 42 |
# File 'app_mesh/http_route_match.rb', line 40 def method @method end |
#path ⇒ AWSCDK::AppMesh::HttpRoutePathMatch? (readonly)
Default: - matches requests with all paths
Specifies how is the request matched based on the path part of its URL.
45 46 47 |
# File 'app_mesh/http_route_match.rb', line 45 def path @path end |
#port ⇒ Numeric? (readonly)
Default: - do not match on port
The port to match from the request.
50 51 52 |
# File 'app_mesh/http_route_match.rb', line 50 def port @port end |
#protocol ⇒ AWSCDK::AppMesh::HttpRouteProtocol? (readonly)
Default: - do not match on HTTP2 request protocol
The client request protocol to match on.
Applicable only for HTTP2 routes.
57 58 59 |
# File 'app_mesh/http_route_match.rb', line 57 def protocol @protocol end |
#query_parameters ⇒ Array<AWSCDK::AppMesh::QueryParameterMatch>? (readonly)
Default: - do not match on query parameters
The query parameters to match on.
All specified query parameters must match for the route to match.
64 65 66 |
# File 'app_mesh/http_route_match.rb', line 64 def query_parameters @query_parameters end |
Class Method Details
.jsii_properties ⇒ Object
66 67 68 69 70 71 72 73 74 75 |
# File 'app_mesh/http_route_match.rb', line 66 def self.jsii_properties { :headers => "headers", :method => "method", :path => "path", :port => "port", :protocol => "protocol", :query_parameters => "queryParameters", } end |
Instance Method Details
#to_jsii ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'app_mesh/http_route_match.rb', line 77 def to_jsii result = {} result.merge!({ "headers" => @headers, "method" => @method, "path" => @path, "port" => @port, "protocol" => @protocol, "queryParameters" => @query_parameters, }) result.compact end |