Class: AWSCDK::AppMesh::HttpRouteMatch

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_mesh/http_route_match.rb

Overview

The criterion for determining a request match for this Route.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(headers: nil, method: nil, path: nil, port: nil, protocol: nil, query_parameters: nil) ⇒ HttpRouteMatch

Returns a new instance of HttpRouteMatch.

Parameters:



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

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

Note:

Default: - do not match on headers

Specifies the client request headers to match on.

All specified headers must match for the route to match.

Returns:



35
36
37
# File 'app_mesh/http_route_match.rb', line 35

def headers
  @headers
end

#methodAWSCDK::AppMesh::HttpRouteMethod? (readonly)

Note:

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

#pathAWSCDK::AppMesh::HttpRoutePathMatch? (readonly)

Note:

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

#portNumeric? (readonly)

Note:

Default: - do not match on port

The port to match from the request.

Returns:

  • (Numeric, nil)


50
51
52
# File 'app_mesh/http_route_match.rb', line 50

def port
  @port
end

#protocolAWSCDK::AppMesh::HttpRouteProtocol? (readonly)

Note:

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_parametersArray<AWSCDK::AppMesh::QueryParameterMatch>? (readonly)

Note:

Default: - do not match on query parameters

The query parameters to match on.

All specified query parameters must match for the route to match.

Returns:



64
65
66
# File 'app_mesh/http_route_match.rb', line 64

def query_parameters
  @query_parameters
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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