Class WeightedTarget.Builder
java.lang.Object
software.amazon.awscdk.services.appmesh.WeightedTarget.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<WeightedTarget>
- Enclosing interface:
WeightedTarget
@Stability(Stable)
public static final class WeightedTarget.Builder
extends Object
implements software.amazon.jsii.Builder<WeightedTarget>
A builder for
WeightedTarget-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofWeightedTarget.getPort()virtualNode(IVirtualNode virtualNode) Sets the value ofWeightedTarget.getVirtualNode()Sets the value ofWeightedTarget.getWeight()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
virtualNode
Sets the value ofWeightedTarget.getVirtualNode()- Parameters:
virtualNode- The VirtualNode the route points to. This parameter is required.- Returns:
this
-
port
Sets the value ofWeightedTarget.getPort()- Parameters:
port- The port to match from the request.- Returns:
this
-
weight
Sets the value ofWeightedTarget.getWeight()- Parameters:
weight- The weight for the target.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<WeightedTarget>- Returns:
- a new instance of
WeightedTarget - Throws:
NullPointerException- if any required attribute was not provided
-