Class: AWSCDK::AppMesh::CfnGatewayRoute::GrpcGatewayRouteActionProperty

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

Overview

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target:, rewrite: nil) ⇒ GrpcGatewayRouteActionProperty

Returns a new instance of GrpcGatewayRouteActionProperty.

Parameters:



981
982
983
984
985
986
# File 'app_mesh/cfn_gateway_route.rb', line 981

def initialize(target:, rewrite: nil)
  @target = target.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnGatewayRoute::GatewayRouteTargetProperty.new(**target.transform_keys(&:to_sym)) : target
  Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmbkdhdGV3YXlSb3V0ZS5HYXRld2F5Um91dGVUYXJnZXRQcm9wZXJ0eSJ9XX19")), "target")
  @rewrite = rewrite.is_a?(Hash) ? ::AWSCDK::AppMesh::CfnGatewayRoute::GrpcGatewayRouteRewriteProperty.new(**rewrite.transform_keys(&:to_sym)) : rewrite
  Jsii::Type.check_type(@rewrite, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmbkdhdGV3YXlSb3V0ZS5HcnBjR2F0ZXdheVJvdXRlUmV3cml0ZVByb3BlcnR5In1dfX0=")), "rewrite") unless @rewrite.nil?
end

Instance Attribute Details

#targetAWSCDK::IResolvable, AWSCDK::AppMesh::CfnGatewayRoute::GatewayRouteTargetProperty (readonly)

An object that represents the target that traffic is routed to when a request matches the gateway route.



992
993
994
# File 'app_mesh/cfn_gateway_route.rb', line 992

def target
  @target
end

Class Method Details

.jsii_propertiesObject



999
1000
1001
1002
1003
1004
# File 'app_mesh/cfn_gateway_route.rb', line 999

def self.jsii_properties
  {
    :target => "target",
    :rewrite => "rewrite",
  }
end

Instance Method Details

#to_jsiiObject



1006
1007
1008
1009
1010
1011
1012
1013
# File 'app_mesh/cfn_gateway_route.rb', line 1006

def to_jsii
  result = {}
  result.merge!({
    "target" => @target,
    "rewrite" => @rewrite,
  })
  result.compact
end