Class: AWSCDK::AppMesh::GrpcRouteMatch

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata: nil, method_name: nil, port: nil, service_name: nil) ⇒ GrpcRouteMatch

Returns a new instance of GrpcRouteMatch.

Parameters:

  • metadata (Array<AWSCDK::AppMesh::HeaderMatch>, nil) (defaults to: nil)

    Create metadata based gRPC route match.

  • method_name (String, nil) (defaults to: nil)

    The method name to match from the request.

  • port (Numeric, nil) (defaults to: nil)

    The port to match from the request.

  • service_name (String, nil) (defaults to: nil)

    Create service name based gRPC route match.



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

#metadataArray<AWSCDK::AppMesh::HeaderMatch>? (readonly)

Note:

Default: - do not match on metadata

Create metadata based gRPC route match.

All specified metadata must match for the route to match.

Returns:



30
31
32
# File 'app_mesh/grpc_route_match.rb', line 30

def 
  @metadata
end

#method_nameString? (readonly)

Note:

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.

Returns:

  • (String, nil)


37
38
39
# File 'app_mesh/grpc_route_match.rb', line 37

def method_name
  @method_name
end

#portNumeric? (readonly)

Note:

Default: - do not match on port

The port to match from the request.

Returns:

  • (Numeric, nil)


42
43
44
# File 'app_mesh/grpc_route_match.rb', line 42

def port
  @port
end

#service_nameString? (readonly)

Note:

Default: - do not match on service name

Create service name based gRPC route match.

Returns:

  • (String, nil)


47
48
49
# File 'app_mesh/grpc_route_match.rb', line 47

def service_name
  @service_name
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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