Class: AWSCDK::VPCLattice::CfnRule::ForwardProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::VPCLattice::CfnRule::ForwardProperty
- Defined in:
- vpc_lattice/cfn_rule.rb
Overview
The forward action.
Traffic that matches the rule is forwarded to the specified target groups.
Instance Attribute Summary collapse
-
#target_groups ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::VPCLattice::CfnRule::WeightedTargetGroupProperty>
readonly
The target groups.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(target_groups:) ⇒ ForwardProperty
constructor
A new instance of ForwardProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(target_groups:) ⇒ ForwardProperty
Returns a new instance of ForwardProperty.
691 692 693 694 |
# File 'vpc_lattice/cfn_rule.rb', line 691 def initialize(target_groups:) @target_groups = target_groups Jsii::Type.check_type(@target_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfdnBjbGF0dGljZS5DZm5SdWxlLldlaWdodGVkVGFyZ2V0R3JvdXBQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "targetGroups") end |
Instance Attribute Details
#target_groups ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::VPCLattice::CfnRule::WeightedTargetGroupProperty> (readonly)
The target groups.
Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.
The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.
704 705 706 |
# File 'vpc_lattice/cfn_rule.rb', line 704 def target_groups @target_groups end |
Class Method Details
.jsii_properties ⇒ Object
706 707 708 709 710 |
# File 'vpc_lattice/cfn_rule.rb', line 706 def self.jsii_properties { :target_groups => "targetGroups", } end |
Instance Method Details
#to_jsii ⇒ Object
712 713 714 715 716 717 718 |
# File 'vpc_lattice/cfn_rule.rb', line 712 def to_jsii result = {} result.merge!({ "targetGroups" => @target_groups, }) result.compact end |