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