Class: AWSCDK::ECS::AlternateTargetConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::AlternateTargetConfig
- Defined in:
- ecs/alternate_target_config.rb
Overview
Configuration returned by AlternateTargetConfiguration.bind().
Instance Attribute Summary collapse
-
#alternate_target_group_arn ⇒ String
readonly
The ARN of the alternate target group.
-
#production_listener_rule ⇒ String?
readonly
The production listener rule ARN (ALB) or listener ARN (NLB).
-
#role_arn ⇒ String
readonly
The IAM role ARN for the configuration.
-
#test_listener_rule ⇒ String?
readonly
The test listener rule ARN (ALB) or listener ARN (NLB).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alternate_target_group_arn:, role_arn:, production_listener_rule: nil, test_listener_rule: nil) ⇒ AlternateTargetConfig
constructor
A new instance of AlternateTargetConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(alternate_target_group_arn:, role_arn:, production_listener_rule: nil, test_listener_rule: nil) ⇒ AlternateTargetConfig
Returns a new instance of AlternateTargetConfig.
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_arn ⇒ String (readonly)
The ARN of the alternate target group.
25 26 27 |
# File 'ecs/alternate_target_config.rb', line 25 def alternate_target_group_arn @alternate_target_group_arn end |
#production_listener_rule ⇒ String? (readonly)
Note:
Default: - none
The production listener rule ARN (ALB) or listener ARN (NLB).
35 36 37 |
# File 'ecs/alternate_target_config.rb', line 35 def production_listener_rule @production_listener_rule end |
#role_arn ⇒ String (readonly)
Note:
Default: - a new role will be created
The IAM role ARN for the configuration.
30 31 32 |
# File 'ecs/alternate_target_config.rb', line 30 def role_arn @role_arn end |
#test_listener_rule ⇒ String? (readonly)
Note:
Default: - none
The test listener rule ARN (ALB) or listener ARN (NLB).
40 41 42 |
# File 'ecs/alternate_target_config.rb', line 40 def test_listener_rule @test_listener_rule end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |