Class: AWSCDK::AppMesh::HttpGatewayRouteSpecOptions

Inherits:
CommonGatewayRouteSpecOptions
  • Object
show all
Defined in:
app_mesh/http_gateway_route_spec_options.rb

Overview

Properties specific for HTTP Based GatewayRoutes.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(priority: nil, route_target:, match: nil) ⇒ HttpGatewayRouteSpecOptions

Returns a new instance of HttpGatewayRouteSpecOptions.

Parameters:



10
11
12
13
14
15
16
17
# File 'app_mesh/http_gateway_route_spec_options.rb', line 10

def initialize(priority: nil, route_target:, match: nil)
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil?
  @route_target = route_target
  Jsii::Type.check_type(@route_target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5JVmlydHVhbFNlcnZpY2UifQ==")), "routeTarget")
  @match = match.is_a?(Hash) ? ::AWSCDK::AppMesh::HttpGatewayRouteMatch.new(**match.transform_keys(&:to_sym)) : match
  Jsii::Type.check_type(@match, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5IdHRwR2F0ZXdheVJvdXRlTWF0Y2gifQ==")), "match") unless @match.nil?
end

Instance Attribute Details

#matchAWSCDK::AppMesh::HttpGatewayRouteMatch? (readonly)

Note:

Default: - matches any path and automatically rewrites the path to '/'

The criterion for determining a request match for this GatewayRoute.

When path match is defined, this may optionally determine the path rewrite configuration.



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

def match
  @match
end

#priorityNumeric? (readonly)

Note:

Default: - no particular priority

The priority for the gateway route.

When a Virtual Gateway has multiple gateway routes, gateway route match is performed in the order of specified value, where 0 is the highest priority, and first matched gateway route is selected.

Returns:

  • (Numeric, nil)


27
28
29
# File 'app_mesh/http_gateway_route_spec_options.rb', line 27

def priority
  @priority
end

#route_targetAWSCDK::AppMesh::IVirtualService (readonly)

The VirtualService this GatewayRoute directs traffic to.



31
32
33
# File 'app_mesh/http_gateway_route_spec_options.rb', line 31

def route_target
  @route_target
end

Class Method Details

.jsii_propertiesObject



40
41
42
43
44
45
46
# File 'app_mesh/http_gateway_route_spec_options.rb', line 40

def self.jsii_properties
  {
    :priority => "priority",
    :route_target => "routeTarget",
    :match => "match",
  }
end

Instance Method Details

#to_jsiiObject



48
49
50
51
52
53
54
55
56
57
# File 'app_mesh/http_gateway_route_spec_options.rb', line 48

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "priority" => @priority,
    "routeTarget" => @route_target,
    "match" => @match,
  })
  result.compact
end