Class CfnRule.ForwardProperty.Builder
java.lang.Object
software.amazon.awscdk.services.vpclattice.CfnRule.ForwardProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRule.ForwardProperty>
- Enclosing interface:
CfnRule.ForwardProperty
@Stability(Stable)
public static final class CfnRule.ForwardProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRule.ForwardProperty>
A builder for
CfnRule.ForwardProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.targetGroups
(List<? extends Object> targetGroups) Sets the value ofCfnRule.ForwardProperty.getTargetGroups()
targetGroups
(IResolvable targetGroups) Sets the value ofCfnRule.ForwardProperty.getTargetGroups()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
targetGroups
Sets the value ofCfnRule.ForwardProperty.getTargetGroups()
- Parameters:
targetGroups
- The target groups. This parameter is required. 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.
- Returns:
this
-
targetGroups
@Stability(Stable) public CfnRule.ForwardProperty.Builder targetGroups(List<? extends Object> targetGroups) Sets the value ofCfnRule.ForwardProperty.getTargetGroups()
- Parameters:
targetGroups
- The target groups. This parameter is required. 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.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRule.ForwardProperty>
- Returns:
- a new instance of
CfnRule.ForwardProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-