Class: AWSCDK::ElasticLoadBalancingv2::WeightedTargetGroup
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancingv2::WeightedTargetGroup
- Defined in:
- elastic_load_balancingv2/weighted_target_group.rb
Overview
A Target Group and weight combination.
Instance Attribute Summary collapse
-
#target_group ⇒ AWSCDK::ElasticLoadBalancingv2::IApplicationTargetGroup
readonly
The target group.
-
#weight ⇒ Numeric?
readonly
The target group's weight.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(target_group:, weight: nil) ⇒ WeightedTargetGroup
constructor
A new instance of WeightedTargetGroup.
- #to_jsii ⇒ Object
Constructor Details
#initialize(target_group:, weight: nil) ⇒ WeightedTargetGroup
Returns a new instance of WeightedTargetGroup.
9 10 11 12 13 14 |
# File 'elastic_load_balancingv2/weighted_target_group.rb', line 9 def initialize(target_group:, weight: nil) @target_group = target_group Jsii::Type.check_type(@target_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JQXBwbGljYXRpb25UYXJnZXRHcm91cCJ9")), "targetGroup") @weight = weight Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil? end |
Instance Attribute Details
#target_group ⇒ AWSCDK::ElasticLoadBalancingv2::IApplicationTargetGroup (readonly)
The target group.
19 20 21 |
# File 'elastic_load_balancingv2/weighted_target_group.rb', line 19 def target_group @target_group end |
#weight ⇒ Numeric? (readonly)
Note:
Default: 1
The target group's weight.
Range is [0..1000).
26 27 28 |
# File 'elastic_load_balancingv2/weighted_target_group.rb', line 26 def weight @weight end |
Class Method Details
.jsii_properties ⇒ Object
28 29 30 31 32 33 |
# File 'elastic_load_balancingv2/weighted_target_group.rb', line 28 def self.jsii_properties { :target_group => "targetGroup", :weight => "weight", } end |
Instance Method Details
#to_jsii ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'elastic_load_balancingv2/weighted_target_group.rb', line 35 def to_jsii result = {} result.merge!({ "targetGroup" => @target_group, "weight" => @weight, }) result.compact end |