Class: AWSCDK::AppMesh::GatewayRouteSpecConfig

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

Overview

All Properties for GatewayRoute Specs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(grpc_spec_config: nil, http2_spec_config: nil, http_spec_config: nil, priority: nil) ⇒ GatewayRouteSpecConfig

Returns a new instance of GatewayRouteSpecConfig.

Parameters:



11
12
13
14
15
16
17
18
19
20
# File 'app_mesh/gateway_route_spec_config.rb', line 11

def initialize(grpc_spec_config: nil, http2_spec_config: nil, http_spec_config: nil, priority: nil)
  @grpc_spec_config = grpc_spec_config.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnGatewayRoute::GrpcGatewayRouteProperty.new(**grpc_spec_config.transform_keys(&:to_sym)) : grpc_spec_config
  Jsii::Type.check_type(@grpc_spec_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5DZm5HYXRld2F5Um91dGUuR3JwY0dhdGV3YXlSb3V0ZVByb3BlcnR5In0=")), "grpcSpecConfig") unless @grpc_spec_config.nil?
  @http2_spec_config = http2_spec_config.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnGatewayRoute::HttpGatewayRouteProperty.new(**http2_spec_config.transform_keys(&:to_sym)) : http2_spec_config
  Jsii::Type.check_type(@http2_spec_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5DZm5HYXRld2F5Um91dGUuSHR0cEdhdGV3YXlSb3V0ZVByb3BlcnR5In0=")), "http2SpecConfig") unless @http2_spec_config.nil?
  @http_spec_config = http_spec_config.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnGatewayRoute::HttpGatewayRouteProperty.new(**http_spec_config.transform_keys(&:to_sym)) : http_spec_config
  Jsii::Type.check_type(@http_spec_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbWVzaC5DZm5HYXRld2F5Um91dGUuSHR0cEdhdGV3YXlSb3V0ZVByb3BlcnR5In0=")), "httpSpecConfig") unless @http_spec_config.nil?
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil?
end

Instance Attribute Details

#grpc_spec_configAWSCDK::AppMesh::CfnGatewayRoute::GrpcGatewayRouteProperty? (readonly)

Note:

Default: - no grpc spec

The spec for a grpc gateway route.



26
27
28
# File 'app_mesh/gateway_route_spec_config.rb', line 26

def grpc_spec_config
  @grpc_spec_config
end

#http2_spec_configAWSCDK::AppMesh::CfnGatewayRoute::HttpGatewayRouteProperty? (readonly)

Note:

Default: - no http2 spec

The spec for an http2 gateway route.



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

def http2_spec_config
  @http2_spec_config
end

#http_spec_configAWSCDK::AppMesh::CfnGatewayRoute::HttpGatewayRouteProperty? (readonly)

Note:

Default: - no http spec

The spec for an http gateway route.



36
37
38
# File 'app_mesh/gateway_route_spec_config.rb', line 36

def http_spec_config
  @http_spec_config
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)


45
46
47
# File 'app_mesh/gateway_route_spec_config.rb', line 45

def priority
  @priority
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'app_mesh/gateway_route_spec_config.rb', line 47

def self.jsii_properties
  {
    :grpc_spec_config => "grpcSpecConfig",
    :http2_spec_config => "http2SpecConfig",
    :http_spec_config => "httpSpecConfig",
    :priority => "priority",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'app_mesh/gateway_route_spec_config.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "grpcSpecConfig" => @grpc_spec_config,
    "http2SpecConfig" => @http2_spec_config,
    "httpSpecConfig" => @http_spec_config,
    "priority" => @priority,
  })
  result.compact
end