Class: AWSCDK::CodeDeploy::CfnDeploymentGroup::TargetGroupPairInfoProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_deploy/cfn_deployment_group.rb

Overview

Information about two target groups and how traffic is routed during an Amazon ECS deployment.

An optional test traffic route can be specified.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prod_traffic_route: nil, target_groups: nil, test_traffic_route: nil) ⇒ TargetGroupPairInfoProperty

Returns a new instance of TargetGroupPairInfoProperty.

Parameters:



1874
1875
1876
1877
1878
1879
1880
1881
# File 'code_deploy/cfn_deployment_group.rb', line 1874

def initialize(prod_traffic_route: nil, target_groups: nil, test_traffic_route: nil)
  @prod_traffic_route = prod_traffic_route.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentGroup::TrafficRouteProperty.new(**prod_traffic_route.transform_keys(&:to_sym)) : prod_traffic_route
  Jsii::Type.check_type(@prod_traffic_route, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRHcm91cC5UcmFmZmljUm91dGVQcm9wZXJ0eSJ9XX19")), "prodTrafficRoute") unless @prod_traffic_route.nil?
  @target_groups = target_groups
  Jsii::Type.check_type(@target_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5DZm5EZXBsb3ltZW50R3JvdXAuVGFyZ2V0R3JvdXBJbmZvUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "targetGroups") unless @target_groups.nil?
  @test_traffic_route = test_traffic_route.is_a?(Hash) ? ::AWSCDK::CodeDeploy::CfnDeploymentGroup::TrafficRouteProperty.new(**test_traffic_route.transform_keys(&:to_sym)) : test_traffic_route
  Jsii::Type.check_type(@test_traffic_route, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlZGVwbG95LkNmbkRlcGxveW1lbnRHcm91cC5UcmFmZmljUm91dGVQcm9wZXJ0eSJ9XX19")), "testTrafficRoute") unless @test_traffic_route.nil?
end

Instance Attribute Details

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

The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.



1887
1888
1889
# File 'code_deploy/cfn_deployment_group.rb', line 1887

def prod_traffic_route
  @prod_traffic_route
end

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

One pair of target groups.

One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.



1894
1895
1896
# File 'code_deploy/cfn_deployment_group.rb', line 1894

def target_groups
  @target_groups
end

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

An optional path used by a load balancer to route test traffic after an Amazon ECS deployment.

Validation can occur while test traffic is served during a deployment.



1901
1902
1903
# File 'code_deploy/cfn_deployment_group.rb', line 1901

def test_traffic_route
  @test_traffic_route
end

Class Method Details

.jsii_propertiesObject



1903
1904
1905
1906
1907
1908
1909
# File 'code_deploy/cfn_deployment_group.rb', line 1903

def self.jsii_properties
  {
    :prod_traffic_route => "prodTrafficRoute",
    :target_groups => "targetGroups",
    :test_traffic_route => "testTrafficRoute",
  }
end

Instance Method Details

#to_jsiiObject



1911
1912
1913
1914
1915
1916
1917
1918
1919
# File 'code_deploy/cfn_deployment_group.rb', line 1911

def to_jsii
  result = {}
  result.merge!({
    "prodTrafficRoute" => @prod_traffic_route,
    "targetGroups" => @target_groups,
    "testTrafficRoute" => @test_traffic_route,
  })
  result.compact
end