Class: AWSCDK::CfnTrafficRouting
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CfnTrafficRouting
- Defined in:
- cfn_traffic_routing.rb
Overview
Type of the CfnCodeDeployBlueGreenEcsAttributes.trafficRouting property.
Instance Attribute Summary collapse
-
#prod_traffic_route ⇒ AWSCDK::CfnTrafficRoute
readonly
The listener to be used by your load balancer to direct traffic to your target groups.
-
#target_groups ⇒ Array<String>
readonly
The logical IDs of the blue and green, respectively, AWS::ElasticLoadBalancingV2::TargetGroup target groups.
-
#test_traffic_route ⇒ AWSCDK::CfnTrafficRoute
readonly
The listener to be used by your load balancer to direct traffic to your target groups.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(prod_traffic_route:, target_groups:, test_traffic_route:) ⇒ CfnTrafficRouting
constructor
A new instance of CfnTrafficRouting.
- #to_jsii ⇒ Object
Constructor Details
#initialize(prod_traffic_route:, target_groups:, test_traffic_route:) ⇒ CfnTrafficRouting
Returns a new instance of CfnTrafficRouting.
10 11 12 13 14 15 16 17 |
# File 'cfn_traffic_routing.rb', line 10 def initialize(prod_traffic_route:, target_groups:, test_traffic_route:) @prod_traffic_route = prod_traffic_route.is_a?(Hash) ? ::AWSCDK::CfnTrafficRoute.new(**prod_traffic_route.transform_keys(&:to_sym)) : prod_traffic_route Jsii::Type.check_type(@prod_traffic_route, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UcmFmZmljUm91dGUifQ==")), "prodTrafficRoute") @target_groups = target_groups Jsii::Type.check_type(@target_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "targetGroups") @test_traffic_route = test_traffic_route.is_a?(Hash) ? ::AWSCDK::CfnTrafficRoute.new(**test_traffic_route.transform_keys(&:to_sym)) : test_traffic_route Jsii::Type.check_type(@test_traffic_route, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UcmFmZmljUm91dGUifQ==")), "testTrafficRoute") end |
Instance Attribute Details
#prod_traffic_route ⇒ AWSCDK::CfnTrafficRoute (readonly)
The listener to be used by your load balancer to direct traffic to your target groups.
22 23 24 |
# File 'cfn_traffic_routing.rb', line 22 def prod_traffic_route @prod_traffic_route end |
#target_groups ⇒ Array<String> (readonly)
The logical IDs of the blue and green, respectively, AWS::ElasticLoadBalancingV2::TargetGroup target groups.
26 27 28 |
# File 'cfn_traffic_routing.rb', line 26 def target_groups @target_groups end |
#test_traffic_route ⇒ AWSCDK::CfnTrafficRoute (readonly)
The listener to be used by your load balancer to direct traffic to your target groups.
30 31 32 |
# File 'cfn_traffic_routing.rb', line 30 def test_traffic_route @test_traffic_route end |
Class Method Details
.jsii_properties ⇒ Object
32 33 34 35 36 37 38 |
# File 'cfn_traffic_routing.rb', line 32 def self.jsii_properties { :prod_traffic_route => "prodTrafficRoute", :target_groups => "targetGroups", :test_traffic_route => "testTrafficRoute", } end |
Instance Method Details
#to_jsii ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'cfn_traffic_routing.rb', line 40 def to_jsii result = {} result.merge!({ "prodTrafficRoute" => @prod_traffic_route, "targetGroups" => @target_groups, "testTrafficRoute" => @test_traffic_route, }) result.compact end |