Class: AWSCDK::AppMesh::GrpcRouteMatch
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::GrpcRouteMatch
- Defined in:
- app_mesh/grpc_route_match.rb
Overview
The criterion for determining a request match for this Route.
At least one match type must be selected.
Instance Attribute Summary collapse
-
#metadata ⇒ Array<AWSCDK::AppMesh::HeaderMatch>?
readonly
Create metadata based gRPC route match.
-
#method_name ⇒ String?
readonly
The method name to match from the request.
-
#port ⇒ Numeric?
readonly
The port to match from the request.
-
#service_name ⇒ String?
readonly
Create service name based gRPC route match.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, method_name: nil, port: nil, service_name: nil) ⇒ GrpcRouteMatch
constructor
A new instance of GrpcRouteMatch.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metadata: nil, method_name: nil, port: nil, service_name: nil) ⇒ GrpcRouteMatch
Returns a new instance of GrpcRouteMatch.
13 14 15 16 17 18 19 20 21 22 |
# File 'app_mesh/grpc_route_match.rb', line 13 def initialize(metadata: nil, method_name: nil, port: nil, service_name: nil) @metadata = Jsii::Type.check_type(@metadata, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkhlYWRlck1hdGNoIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "metadata") unless @metadata.nil? @method_name = method_name Jsii::Type.check_type(@method_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "methodName") unless @method_name.nil? @port = port Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "port") unless @port.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
#metadata ⇒ Array<AWSCDK::AppMesh::HeaderMatch>? (readonly)
Default: - do not match on metadata
Create metadata based gRPC route match.
All specified metadata must match for the route to match.
30 31 32 |
# File 'app_mesh/grpc_route_match.rb', line 30 def @metadata end |
#method_name ⇒ String? (readonly)
Default: - do not match on method name
The method name to match from the request.
If the method name is specified, service name must be also provided.
37 38 39 |
# File 'app_mesh/grpc_route_match.rb', line 37 def method_name @method_name end |
#port ⇒ Numeric? (readonly)
Default: - do not match on port
The port to match from the request.
42 43 44 |
# File 'app_mesh/grpc_route_match.rb', line 42 def port @port end |
#service_name ⇒ String? (readonly)
Default: - do not match on service name
Create service name based gRPC route match.
47 48 49 |
# File 'app_mesh/grpc_route_match.rb', line 47 def service_name @service_name end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'app_mesh/grpc_route_match.rb', line 49 def self.jsii_properties { :metadata => "metadata", :method_name => "methodName", :port => "port", :service_name => "serviceName", } end |
Instance Method Details
#to_jsii ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'app_mesh/grpc_route_match.rb', line 58 def to_jsii result = {} result.merge!({ "metadata" => @metadata, "methodName" => @method_name, "port" => @port, "serviceName" => @service_name, }) result.compact end |