Class: AWSCDK::VPCLattice::CfnListener::WeightedTargetGroupProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::VPCLattice::CfnListener::WeightedTargetGroupProperty
- Defined in:
- vpc_lattice/cfn_listener.rb
Overview
Describes the weight of a target group.
Instance Attribute Summary collapse
-
#target_group_identifier ⇒ String
readonly
The ID of the target group.
-
#weight ⇒ Numeric?
readonly
Only required if you specify multiple target groups for a forward action.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(target_group_identifier:, weight: nil) ⇒ WeightedTargetGroupProperty
constructor
A new instance of WeightedTargetGroupProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(target_group_identifier:, weight: nil) ⇒ WeightedTargetGroupProperty
Returns a new instance of WeightedTargetGroupProperty.
731 732 733 734 735 736 |
# File 'vpc_lattice/cfn_listener.rb', line 731 def initialize(target_group_identifier:, weight: nil) @target_group_identifier = target_group_identifier Jsii::Type.check_type(@target_group_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetGroupIdentifier") @weight = weight Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil? end |
Instance Attribute Details
#target_group_identifier ⇒ String (readonly)
The ID of the target group.
742 743 744 |
# File 'vpc_lattice/cfn_listener.rb', line 742 def target_group_identifier @target_group_identifier end |
#weight ⇒ Numeric? (readonly)
Only required if you specify multiple target groups for a forward action.
The weight determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.
749 750 751 |
# File 'vpc_lattice/cfn_listener.rb', line 749 def weight @weight end |
Class Method Details
.jsii_properties ⇒ Object
751 752 753 754 755 756 |
# File 'vpc_lattice/cfn_listener.rb', line 751 def self.jsii_properties { :target_group_identifier => "targetGroupIdentifier", :weight => "weight", } end |
Instance Method Details
#to_jsii ⇒ Object
758 759 760 761 762 763 764 765 |
# File 'vpc_lattice/cfn_listener.rb', line 758 def to_jsii result = {} result.merge!({ "targetGroupIdentifier" => @target_group_identifier, "weight" => @weight, }) result.compact end |