Class: AWSCDK::AppMesh::CfnGatewayRoute::HttpGatewayRouteActionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AppMesh::CfnGatewayRoute::HttpGatewayRouteActionProperty
- 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
-
#rewrite ⇒ AWSCDK::IResolvable, ...
readonly
The gateway route action to rewrite.
-
#target ⇒ AWSCDK::IResolvable, AWSCDK::AppMesh::CfnGatewayRoute::GatewayRouteTargetProperty
readonly
An object that represents the target that traffic is routed to when a request matches the gateway route.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(target:, rewrite: nil) ⇒ HttpGatewayRouteActionProperty
constructor
A new instance of HttpGatewayRouteActionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(target:, rewrite: nil) ⇒ HttpGatewayRouteActionProperty
Returns a new instance of HttpGatewayRouteActionProperty.
1218 1219 1220 1221 1222 1223 |
# File 'app_mesh/cfn_gateway_route.rb', line 1218 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::HttpGatewayRouteRewriteProperty.new(**rewrite.transform_keys(&:to_sym)) : rewrite Jsii::Type.check_type(@rewrite, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBtZXNoLkNmbkdhdGV3YXlSb3V0ZS5IdHRwR2F0ZXdheVJvdXRlUmV3cml0ZVByb3BlcnR5In1dfX0=")), "rewrite") unless @rewrite.nil? end |
Instance Attribute Details
#rewrite ⇒ AWSCDK::IResolvable, ... (readonly)
The gateway route action to rewrite.
1234 1235 1236 |
# File 'app_mesh/cfn_gateway_route.rb', line 1234 def rewrite @rewrite end |
#target ⇒ AWSCDK::IResolvable, AWSCDK::AppMesh::CfnGatewayRoute::GatewayRouteTargetProperty (readonly)
An object that represents the target that traffic is routed to when a request matches the gateway route.
1229 1230 1231 |
# File 'app_mesh/cfn_gateway_route.rb', line 1229 def target @target end |
Class Method Details
.jsii_properties ⇒ Object
1236 1237 1238 1239 1240 1241 |
# File 'app_mesh/cfn_gateway_route.rb', line 1236 def self.jsii_properties { :target => "target", :rewrite => "rewrite", } end |
Instance Method Details
#to_jsii ⇒ Object
1243 1244 1245 1246 1247 1248 1249 1250 |
# File 'app_mesh/cfn_gateway_route.rb', line 1243 def to_jsii result = {} result.merge!({ "target" => @target, "rewrite" => @rewrite, }) result.compact end |