Class: AWSCDK::VPCLattice::CfnListener::ForwardProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::VPCLattice::CfnListener::ForwardProperty
- Defined in:
- vpc_lattice/cfn_listener.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::CfnListener::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.
693 694 695 696 |
# File 'vpc_lattice/cfn_listener.rb', line 693 def initialize(target_groups:) @target_groups = target_groups Jsii::Type.check_type(@target_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfdnBjbGF0dGljZS5DZm5MaXN0ZW5lci5XZWlnaHRlZFRhcmdldEdyb3VwUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "targetGroups") end |
Instance Attribute Details
#target_groups ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::VPCLattice::CfnListener::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.
706 707 708 |
# File 'vpc_lattice/cfn_listener.rb', line 706 def target_groups @target_groups end |
Class Method Details
.jsii_properties ⇒ Object
708 709 710 711 712 |
# File 'vpc_lattice/cfn_listener.rb', line 708 def self.jsii_properties { :target_groups => "targetGroups", } end |
Instance Method Details
#to_jsii ⇒ Object
714 715 716 717 718 719 720 |
# File 'vpc_lattice/cfn_listener.rb', line 714 def to_jsii result = {} result.merge!({ "targetGroups" => @target_groups, }) result.compact end |