Class: AWSCDK::ECS::AlternateTargetConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/alternate_target_config.rb

Overview

Configuration returned by AlternateTargetConfiguration.bind().

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alternate_target_group_arn:, role_arn:, production_listener_rule: nil, test_listener_rule: nil) ⇒ AlternateTargetConfig

Returns a new instance of AlternateTargetConfig.

Parameters:

  • alternate_target_group_arn (String)

    The ARN of the alternate target group.

  • role_arn (String)

    The IAM role ARN for the configuration.

  • production_listener_rule (String, nil) (defaults to: nil)

    The production listener rule ARN (ALB) or listener ARN (NLB).

  • test_listener_rule (String, nil) (defaults to: nil)

    The test listener rule ARN (ALB) or listener ARN (NLB).



11
12
13
14
15
16
17
18
19
20
# File 'ecs/alternate_target_config.rb', line 11

def initialize(alternate_target_group_arn:, role_arn:, production_listener_rule: nil, test_listener_rule: nil)
  @alternate_target_group_arn = alternate_target_group_arn
  Jsii::Type.check_type(@alternate_target_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alternateTargetGroupArn")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @production_listener_rule = production_listener_rule
  Jsii::Type.check_type(@production_listener_rule, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "productionListenerRule") unless @production_listener_rule.nil?
  @test_listener_rule = test_listener_rule
  Jsii::Type.check_type(@test_listener_rule, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "testListenerRule") unless @test_listener_rule.nil?
end

Instance Attribute Details

#alternate_target_group_arnString (readonly)

The ARN of the alternate target group.

Returns:

  • (String)


25
26
27
# File 'ecs/alternate_target_config.rb', line 25

def alternate_target_group_arn
  @alternate_target_group_arn
end

#production_listener_ruleString? (readonly)

Note:

Default: - none

The production listener rule ARN (ALB) or listener ARN (NLB).

Returns:

  • (String, nil)


35
36
37
# File 'ecs/alternate_target_config.rb', line 35

def production_listener_rule
  @production_listener_rule
end

#role_arnString (readonly)

Note:

Default: - a new role will be created

The IAM role ARN for the configuration.

Returns:

  • (String)


30
31
32
# File 'ecs/alternate_target_config.rb', line 30

def role_arn
  @role_arn
end

#test_listener_ruleString? (readonly)

Note:

Default: - none

The test listener rule ARN (ALB) or listener ARN (NLB).

Returns:

  • (String, nil)


40
41
42
# File 'ecs/alternate_target_config.rb', line 40

def test_listener_rule
  @test_listener_rule
end

Class Method Details

.jsii_propertiesObject



42
43
44
45
46
47
48
49
# File 'ecs/alternate_target_config.rb', line 42

def self.jsii_properties
  {
    :alternate_target_group_arn => "alternateTargetGroupArn",
    :role_arn => "roleArn",
    :production_listener_rule => "productionListenerRule",
    :test_listener_rule => "testListenerRule",
  }
end

Instance Method Details

#to_jsiiObject



51
52
53
54
55
56
57
58
59
60
# File 'ecs/alternate_target_config.rb', line 51

def to_jsii
  result = {}
  result.merge!({
    "alternateTargetGroupArn" => @alternate_target_group_arn,
    "roleArn" => @role_arn,
    "productionListenerRule" => @production_listener_rule,
    "testListenerRule" => @test_listener_rule,
  })
  result.compact
end