Class: AWSCDK::AppMesh::HttpGatewayRouteMatch

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

Overview

The criterion for determining a request match for this GatewayRoute.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:



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

#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 gateway route to match.

Returns:



38
39
40
# File 'app_mesh/http_gateway_route_match.rb', line 38

def headers
  @headers
end

#hostnameAWSCDK::AppMesh::GatewayRouteHostnameMatch? (readonly)

Note:

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

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

Note:

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

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

Note:

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

#portNumeric? (readonly)

Note:

Default: - no default port

The port number to match on.

Returns:

  • (Numeric, nil)


58
59
60
# File 'app_mesh/http_gateway_route_match.rb', line 58

def port
  @port
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:



65
66
67
# File 'app_mesh/http_gateway_route_match.rb', line 65

def query_parameters
  @query_parameters
end

#rewrite_request_hostnameBoolean? (readonly)

Note:

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.

Returns:

  • (Boolean, nil)


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_propertiesObject



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_jsiiObject



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