Interface CfnListener.WeightedTargetGroupProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnListener.WeightedTargetGroupProperty.Jsii$Proxy
Enclosing class:
CfnListener

@Stability(Stable) public static interface CfnListener.WeightedTargetGroupProperty extends software.amazon.jsii.JsiiSerializable
Describes the weight of a target group.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.vpclattice.*;
 WeightedTargetGroupProperty weightedTargetGroupProperty = WeightedTargetGroupProperty.builder()
         .targetGroupIdentifier("targetGroupIdentifier")
         // the properties below are optional
         .weight(123)
         .build();
 
  • Method Details

    • getTargetGroupIdentifier

      @Stability(Stable) @NotNull String getTargetGroupIdentifier()
      The ID of the target group.
    • getWeight

      @Stability(Stable) @Nullable default Number getWeight()
      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.

    • builder

      @Stability(Stable) static CfnListener.WeightedTargetGroupProperty.Builder builder()
      Returns:
      a CfnListener.WeightedTargetGroupProperty.Builder of CfnListener.WeightedTargetGroupProperty