Class: AWSCDK::AppMesh::HttpGatewayRouteMatch
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::HttpGatewayRouteMatch
- Defined in:
- app_mesh/http_gateway_route_match.rb
Overview
The criterion for determining a request match for this GatewayRoute.
Instance Attribute Summary collapse
-
#headers ⇒ Array<AWSCDK::AppMesh::HeaderMatch>?
readonly
Specifies the client request headers to match on.
-
#hostname ⇒ AWSCDK::AppMesh::GatewayRouteHostnameMatch?
readonly
The gateway route host name to be matched on.
-
#method ⇒ AWSCDK::AppMesh::HttpRouteMethod?
readonly
The method to match on.
-
#path ⇒ AWSCDK::AppMesh::HttpGatewayRoutePathMatch?
readonly
Specify how to match requests based on the 'path' part of their URL.
-
#port ⇒ Numeric?
readonly
The port number to match on.
-
#query_parameters ⇒ Array<AWSCDK::AppMesh::QueryParameterMatch>?
readonly
The query parameters to match on.
-
#rewrite_request_hostname ⇒ Boolean?
readonly
When
true, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(headers: nil, hostname: nil, method: nil, path: nil, port: nil, query_parameters: nil, rewrite_request_hostname: nil) ⇒ HttpGatewayRouteMatch
constructor
A new instance of HttpGatewayRouteMatch.
- #to_jsii ⇒ Object
Constructor Details
#initialize(headers: nil, hostname: nil, method: nil, path: nil, port: nil, query_parameters: nil, rewrite_request_hostname: nil) ⇒ HttpGatewayRouteMatch
Returns a new instance of HttpGatewayRouteMatch.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app_mesh/http_gateway_route_match.rb', line 14 def initialize(headers: nil, hostname: nil, method: nil, path: nil, port: nil, query_parameters: nil, rewrite_request_hostname: nil) @headers = headers Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkhlYWRlck1hdGNoIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "headers") unless @headers.nil? @hostname = hostname Jsii::Type.check_type(@hostname, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5HYXRld2F5Um91dGVIb3N0bmFtZU1hdGNoIn0=")), "hostname") unless @hostname.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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5IdHRwR2F0ZXdheVJvdXRlUGF0aE1hdGNoIn0=")), "path") unless @path.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.nil? @query_parameters = query_parameters Jsii::Type.check_type(@query_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLlF1ZXJ5UGFyYW1ldGVyTWF0Y2gifSwia2luZCI6ImFycmF5In19")), "queryParameters") unless @query_parameters.nil? @rewrite_request_hostname = rewrite_request_hostname Jsii::Type.check_type(@rewrite_request_hostname, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "rewriteRequestHostname") unless @rewrite_request_hostname.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 gateway route to match.
38 39 40 |
# File 'app_mesh/http_gateway_route_match.rb', line 38 def headers @headers end |
#hostname ⇒ AWSCDK::AppMesh::GatewayRouteHostnameMatch? (readonly)
Default: - do not match on host name
The gateway route host name to be matched on.
43 44 45 |
# File 'app_mesh/http_gateway_route_match.rb', line 43 def hostname @hostname end |
#method ⇒ AWSCDK::AppMesh::HttpRouteMethod? (readonly)
Default: - do not match on method
The method to match on.
48 49 50 |
# File 'app_mesh/http_gateway_route_match.rb', line 48 def method @method end |
#path ⇒ AWSCDK::AppMesh::HttpGatewayRoutePathMatch? (readonly)
Default: - matches requests with any path
Specify how to match requests based on the 'path' part of their URL.
53 54 55 |
# File 'app_mesh/http_gateway_route_match.rb', line 53 def path @path end |
#port ⇒ Numeric? (readonly)
Default: - no default port
The port number to match on.
58 59 60 |
# File 'app_mesh/http_gateway_route_match.rb', line 58 def port @port 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.
65 66 67 |
# File 'app_mesh/http_gateway_route_match.rb', line 65 def query_parameters @query_parameters end |
#rewrite_request_hostname ⇒ Boolean? (readonly)
Default: true
When true, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name.
When false, retains the original hostname from the request.
72 73 74 |
# File 'app_mesh/http_gateway_route_match.rb', line 72 def rewrite_request_hostname @rewrite_request_hostname end |
Class Method Details
.jsii_properties ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 |
# File 'app_mesh/http_gateway_route_match.rb', line 74 def self.jsii_properties { :headers => "headers", :hostname => "hostname", :method => "method", :path => "path", :port => "port", :query_parameters => "queryParameters", :rewrite_request_hostname => "rewriteRequestHostname", } end |
Instance Method Details
#to_jsii ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'app_mesh/http_gateway_route_match.rb', line 86 def to_jsii result = {} result.merge!({ "headers" => @headers, "hostname" => @hostname, "method" => @method, "path" => @path, "port" => @port, "queryParameters" => @query_parameters, "rewriteRequestHostname" => @rewrite_request_hostname, }) result.compact end |