Class: AWSCDK::ElasticLoadBalancingv2::CfnListenerRule::TargetGroupTupleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancingv2/cfn_listener_rule.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.



1864
1865
1866
1867
1868
1869
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1864

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.



1875
1876
1877
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1875

def target_group_arn
  @target_group_arn
end

#weightNumeric? (readonly)

The weight.

The range is 0 to 999.



1882
1883
1884
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1882

def weight
  @weight
end

Class Method Details

.jsii_propertiesObject



1884
1885
1886
1887
1888
1889
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1884

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

Instance Method Details

#to_jsiiObject



1891
1892
1893
1894
1895
1896
1897
1898
# File 'elastic_load_balancingv2/cfn_listener_rule.rb', line 1891

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