Class: AWSCDK::CfnCodeDeployBlueGreenECSAttributes

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cfn_code_deploy_blue_green_ecs_attributes.rb

Overview

The attributes of the ECS Service being deployed.

Type of the CfnCodeDeployBlueGreenApplication.ecsAttributes property.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_definitions:, task_sets:, traffic_routing:) ⇒ CfnCodeDeployBlueGreenECSAttributes

Returns a new instance of CfnCodeDeployBlueGreenECSAttributes.

Parameters:

  • task_definitions (Array<String>)

    The logical IDs of the blue and green, respectively, AWS::ECS::TaskDefinition task definitions.

  • task_sets (Array<String>)

    The logical IDs of the blue and green, respectively, AWS::ECS::TaskSet task sets.

  • traffic_routing (AWSCDK::CfnTrafficRouting)

    The traffic routing configuration.



12
13
14
15
16
17
18
19
# File 'cfn_code_deploy_blue_green_ecs_attributes.rb', line 12

def initialize(task_definitions:, task_sets:, traffic_routing:)
  @task_definitions = task_definitions
  Jsii::Type.check_type(@task_definitions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "taskDefinitions")
  @task_sets = task_sets
  Jsii::Type.check_type(@task_sets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "taskSets")
  @traffic_routing = traffic_routing.is_a?(Hash) ? ::AWSCDK::CfnTrafficRouting.new(**traffic_routing.transform_keys(&:to_sym)) : traffic_routing
  Jsii::Type.check_type(@traffic_routing, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UcmFmZmljUm91dGluZyJ9")), "trafficRouting")
end

Instance Attribute Details

#task_definitionsArray<String> (readonly)

The logical IDs of the blue and green, respectively, AWS::ECS::TaskDefinition task definitions.

Returns:

  • (Array<String>)


24
25
26
# File 'cfn_code_deploy_blue_green_ecs_attributes.rb', line 24

def task_definitions
  @task_definitions
end

#task_setsArray<String> (readonly)

The logical IDs of the blue and green, respectively, AWS::ECS::TaskSet task sets.

Returns:

  • (Array<String>)


28
29
30
# File 'cfn_code_deploy_blue_green_ecs_attributes.rb', line 28

def task_sets
  @task_sets
end

#traffic_routingAWSCDK::CfnTrafficRouting (readonly)

The traffic routing configuration.



32
33
34
# File 'cfn_code_deploy_blue_green_ecs_attributes.rb', line 32

def traffic_routing
  @traffic_routing
end

Class Method Details

.jsii_propertiesObject



34
35
36
37
38
39
40
# File 'cfn_code_deploy_blue_green_ecs_attributes.rb', line 34

def self.jsii_properties
  {
    :task_definitions => "taskDefinitions",
    :task_sets => "taskSets",
    :traffic_routing => "trafficRouting",
  }
end

Instance Method Details

#to_jsiiObject



42
43
44
45
46
47
48
49
50
# File 'cfn_code_deploy_blue_green_ecs_attributes.rb', line 42

def to_jsii
  result = {}
  result.merge!({
    "taskDefinitions" => @task_definitions,
    "taskSets" => @task_sets,
    "trafficRouting" => @traffic_routing,
  })
  result.compact
end