Class: AWSCDK::ElasticLoadBalancingv2::CfnListener::TargetGroupTupleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancingv2/cfn_listener.rb

Overview

Information about how traffic will be distributed between multiple target groups in a forward rule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_group_arn: nil, weight: nil) ⇒ TargetGroupTupleProperty

Returns a new instance of TargetGroupTupleProperty.

Parameters:

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

    The Amazon Resource Name (ARN) of the target group.

  • weight (Numeric, nil) (defaults to: nil)

    The weight.



1541
1542
1543
1544
1545
1546
# File 'elastic_load_balancingv2/cfn_listener.rb', line 1541

def initialize(target_group_arn: nil, weight: nil)
  @target_group_arn = target_group_arn
  Jsii::Type.check_type(@target_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetGroupArn") unless @target_group_arn.nil?
  @weight = weight
  Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil?
end

Instance Attribute Details

#target_group_arnString? (readonly)

The Amazon Resource Name (ARN) of the target group.



1552
1553
1554
# File 'elastic_load_balancingv2/cfn_listener.rb', line 1552

def target_group_arn
  @target_group_arn
end

#weightNumeric? (readonly)

The weight.

The range is 0 to 999.



1559
1560
1561
# File 'elastic_load_balancingv2/cfn_listener.rb', line 1559

def weight
  @weight
end

Class Method Details

.jsii_propertiesObject



1561
1562
1563
1564
1565
1566
# File 'elastic_load_balancingv2/cfn_listener.rb', line 1561

def self.jsii_properties
  {
    :target_group_arn => "targetGroupArn",
    :weight => "weight",
  }
end

Instance Method Details

#to_jsiiObject



1568
1569
1570
1571
1572
1573
1574
1575
# File 'elastic_load_balancingv2/cfn_listener.rb', line 1568

def to_jsii
  result = {}
  result.merge!({
    "targetGroupArn" => @target_group_arn,
    "weight" => @weight,
  })
  result.compact
end