Class: AWSCDK::AppMesh::GrpcGatewayRouteMatch
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::GrpcGatewayRouteMatch
- Defined in:
- app_mesh/grpc_gateway_route_match.rb
Overview
The criterion for determining a request match for this GatewayRoute.
Instance Attribute Summary collapse
-
#hostname ⇒ AWSCDK::AppMesh::GatewayRouteHostnameMatch?
readonly
Create host name based gRPC gateway route match.
-
#metadata ⇒ Array<AWSCDK::AppMesh::HeaderMatch>?
readonly
Create metadata based gRPC gateway route match.
-
#port ⇒ Numeric?
readonly
The port to match from the request.
-
#rewrite_request_hostname ⇒ Boolean?
readonly
When
true, rewrites the original request received at the Virtual Gateway to the destination Virtual Service name. -
#service_name ⇒ String?
readonly
Create service name based gRPC gateway route match.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hostname: nil, metadata: nil, port: nil, rewrite_request_hostname: nil, service_name: nil) ⇒ GrpcGatewayRouteMatch
constructor
A new instance of GrpcGatewayRouteMatch.
- #to_jsii ⇒ Object
Constructor Details
#initialize(hostname: nil, metadata: nil, port: nil, rewrite_request_hostname: nil, service_name: nil) ⇒ GrpcGatewayRouteMatch
Returns a new instance of GrpcGatewayRouteMatch.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app_mesh/grpc_gateway_route_match.rb', line 12 def initialize(hostname: nil, metadata: nil, port: nil, rewrite_request_hostname: nil, service_name: nil) @hostname = hostname Jsii::Type.check_type(@hostname, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5HYXRld2F5Um91dGVIb3N0bmFtZU1hdGNoIn0=")), "hostname") unless @hostname.nil? @metadata = Jsii::Type.check_type(@metadata, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkhlYWRlck1hdGNoIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "metadata") unless @metadata.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.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? @service_name = service_name Jsii::Type.check_type(@service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") unless @service_name.nil? end |
Instance Attribute Details
#hostname ⇒ AWSCDK::AppMesh::GatewayRouteHostnameMatch? (readonly)
Default: - no matching on host name
Create host name based gRPC gateway route match.
29 30 31 |
# File 'app_mesh/grpc_gateway_route_match.rb', line 29 def hostname @hostname end |
#metadata ⇒ Array<AWSCDK::AppMesh::HeaderMatch>? (readonly)
Default: - no matching on metadata
Create metadata based gRPC gateway route match.
All specified metadata must match for the route to match.
36 37 38 |
# File 'app_mesh/grpc_gateway_route_match.rb', line 36 def @metadata end |
#port ⇒ Numeric? (readonly)
Default: - do not match on port
The port to match from the request.
41 42 43 |
# File 'app_mesh/grpc_gateway_route_match.rb', line 41 def port @port 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.
48 49 50 |
# File 'app_mesh/grpc_gateway_route_match.rb', line 48 def rewrite_request_hostname @rewrite_request_hostname end |
#service_name ⇒ String? (readonly)
Default: - no matching on service name
Create service name based gRPC gateway route match.
53 54 55 |
# File 'app_mesh/grpc_gateway_route_match.rb', line 53 def service_name @service_name end |
Class Method Details
.jsii_properties ⇒ Object
55 56 57 58 59 60 61 62 63 |
# File 'app_mesh/grpc_gateway_route_match.rb', line 55 def self.jsii_properties { :hostname => "hostname", :metadata => "metadata", :port => "port", :rewrite_request_hostname => "rewriteRequestHostname", :service_name => "serviceName", } end |
Instance Method Details
#to_jsii ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 |
# File 'app_mesh/grpc_gateway_route_match.rb', line 65 def to_jsii result = {} result.merge!({ "hostname" => @hostname, "metadata" => @metadata, "port" => @port, "rewriteRequestHostname" => @rewrite_request_hostname, "serviceName" => @service_name, }) result.compact end |