Class: AWSCDK::AppMesh::CfnRoute::RouteSpecProperty

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

Overview

An object that represents a route specification.

Specify one route type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(grpc_route: nil, http2_route: nil, http_route: nil, priority: nil, tcp_route: nil) ⇒ RouteSpecProperty

Returns a new instance of RouteSpecProperty.

Parameters:



1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
# File 'app_mesh/cfn_route.rb', line 1722

def initialize(grpc_route: nil, http2_route: nil, http_route: nil, priority: nil, tcp_route: nil)
  @grpc_route = grpc_route.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::GrpcRouteProperty.new(**grpc_route.transform_keys(&:to_sym)) : grpc_route
  Jsii::Type.check_type(@grpc_route, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkdycGNSb3V0ZVByb3BlcnR5In1dfX0=")), "grpcRoute") unless @grpc_route.nil?
  @http2_route = http2_route.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::HttpRouteProperty.new(**http2_route.transform_keys(&:to_sym)) : http2_route
  Jsii::Type.check_type(@http2_route, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkh0dHBSb3V0ZVByb3BlcnR5In1dfX0=")), "http2Route") unless @http2_route.nil?
  @http_route = http_route.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::HttpRouteProperty.new(**http_route.transform_keys(&:to_sym)) : http_route
  Jsii::Type.check_type(@http_route, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkh0dHBSb3V0ZVByb3BlcnR5In1dfX0=")), "httpRoute") unless @http_route.nil?
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil?
  @tcp_route = tcp_route.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::TCPRouteProperty.new(**tcp_route.transform_keys(&:to_sym)) : tcp_route
  Jsii::Type.check_type(@tcp_route, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLlRjcFJvdXRlUHJvcGVydHkifV19fQ==")), "tcpRoute") unless @tcp_route.nil?
end

Instance Attribute Details

#grpc_routeAWSCDK::IResolvable, ... (readonly)

An object that represents the specification of a gRPC route.



1739
1740
1741
# File 'app_mesh/cfn_route.rb', line 1739

def grpc_route
  @grpc_route
end

#http2_routeAWSCDK::IResolvable, ... (readonly)

An object that represents the specification of an HTTP/2 route.



1744
1745
1746
# File 'app_mesh/cfn_route.rb', line 1744

def http2_route
  @http2_route
end

#http_routeAWSCDK::IResolvable, ... (readonly)

An object that represents the specification of an HTTP route.



1749
1750
1751
# File 'app_mesh/cfn_route.rb', line 1749

def http_route
  @http_route
end

#priorityNumeric? (readonly)

The priority for the route.

Routes are matched based on the specified value, where 0 is the highest priority.



1756
1757
1758
# File 'app_mesh/cfn_route.rb', line 1756

def priority
  @priority
end

#tcp_routeAWSCDK::IResolvable, ... (readonly)

An object that represents the specification of a TCP route.



1761
1762
1763
# File 'app_mesh/cfn_route.rb', line 1761

def tcp_route
  @tcp_route
end

Class Method Details

.jsii_propertiesObject



1763
1764
1765
1766
1767
1768
1769
1770
1771
# File 'app_mesh/cfn_route.rb', line 1763

def self.jsii_properties
  {
    :grpc_route => "grpcRoute",
    :http2_route => "http2Route",
    :http_route => "httpRoute",
    :priority => "priority",
    :tcp_route => "tcpRoute",
  }
end

Instance Method Details

#to_jsiiObject



1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
# File 'app_mesh/cfn_route.rb', line 1773

def to_jsii
  result = {}
  result.merge!({
    "grpcRoute" => @grpc_route,
    "http2Route" => @http2_route,
    "httpRoute" => @http_route,
    "priority" => @priority,
    "tcpRoute" => @tcp_route,
  })
  result.compact
end