Class: AWSCDK::AppMesh::CfnRoute::GrpcRouteProperty

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

Overview

An object that represents a gRPC route type.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, match:, retry_policy: nil, timeout: nil) ⇒ GrpcRouteProperty

Returns a new instance of GrpcRouteProperty.

Parameters:



1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
# File 'app_mesh/cfn_route.rb', line 1001

def initialize(action:, match:, retry_policy: nil, timeout: nil)
  @action = action.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::GrpcRouteActionProperty.new(**action.transform_keys(&:to_sym)) : action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkdycGNSb3V0ZUFjdGlvblByb3BlcnR5In1dfX0=")), "action")
  @match = match.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::GrpcRouteMatchProperty.new(**match.transform_keys(&:to_sym)) : match
  Jsii::Type.check_type(@match, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkdycGNSb3V0ZU1hdGNoUHJvcGVydHkifV19fQ==")), "match")
  @retry_policy = retry_policy.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::GrpcRetryPolicyProperty.new(**retry_policy.transform_keys(&:to_sym)) : retry_policy
  Jsii::Type.check_type(@retry_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkdycGNSZXRyeVBvbGljeVByb3BlcnR5In1dfX0=")), "retryPolicy") unless @retry_policy.nil?
  @timeout = timeout.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnRoute::GrpcTimeoutProperty.new(**timeout.transform_keys(&:to_sym)) : timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmblJvdXRlLkdycGNUaW1lb3V0UHJvcGVydHkifV19fQ==")), "timeout") unless @timeout.nil?
end

Instance Attribute Details

#actionAWSCDK::IResolvable, AWSCDK::AppMesh::CfnRoute::GrpcRouteActionProperty (readonly)

An object that represents the action to take if a match is determined.



1016
1017
1018
# File 'app_mesh/cfn_route.rb', line 1016

def action
  @action
end

#matchAWSCDK::IResolvable, AWSCDK::AppMesh::CfnRoute::GrpcRouteMatchProperty (readonly)

An object that represents the criteria for determining a request match.



1021
1022
1023
# File 'app_mesh/cfn_route.rb', line 1021

def match
  @match
end

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

An object that represents a retry policy.



1026
1027
1028
# File 'app_mesh/cfn_route.rb', line 1026

def retry_policy
  @retry_policy
end

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

An object that represents types of timeouts.



1031
1032
1033
# File 'app_mesh/cfn_route.rb', line 1031

def timeout
  @timeout
end

Class Method Details

.jsii_propertiesObject



1033
1034
1035
1036
1037
1038
1039
1040
# File 'app_mesh/cfn_route.rb', line 1033

def self.jsii_properties
  {
    :action => "action",
    :match => "match",
    :retry_policy => "retryPolicy",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
# File 'app_mesh/cfn_route.rb', line 1042

def to_jsii
  result = {}
  result.merge!({
    "action" => @action,
    "match" => @match,
    "retryPolicy" => @retry_policy,
    "timeout" => @timeout,
  })
  result.compact
end