Class CfnRoute.WeightedTargetProperty.Builder
java.lang.Object
software.amazon.awscdk.services.appmesh.CfnRoute.WeightedTargetProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRoute.WeightedTargetProperty>
- Enclosing interface:
- CfnRoute.WeightedTargetProperty
@Stability(Stable)
public static final class CfnRoute.WeightedTargetProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRoute.WeightedTargetProperty>
A builder for
CfnRoute.WeightedTargetProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnRoute.WeightedTargetProperty.getPort()virtualNode(String virtualNode) Sets the value ofCfnRoute.WeightedTargetProperty.getVirtualNode()Sets the value ofCfnRoute.WeightedTargetProperty.getWeight()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
virtualNode
Sets the value ofCfnRoute.WeightedTargetProperty.getVirtualNode()- Parameters:
virtualNode- The virtual node to associate with the weighted target. This parameter is required.- Returns:
this
-
weight
Sets the value ofCfnRoute.WeightedTargetProperty.getWeight()- Parameters:
weight- The relative weight of the weighted target. This parameter is required.- Returns:
this
-
port
Sets the value ofCfnRoute.WeightedTargetProperty.getPort()- Parameters:
port- The targeted port of the weighted object.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnRoute.WeightedTargetProperty>- Returns:
- a new instance of
CfnRoute.WeightedTargetProperty - Throws:
NullPointerException- if any required attribute was not provided
-