interface WeightedTargetProperty
| Language | Type name | 
|---|---|
  .NET | Amazon.CDK.AWS.AppMesh.CfnRoute.WeightedTargetProperty | 
  Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#CfnRoute_WeightedTargetProperty | 
  Java | software.amazon.awscdk.services.appmesh.CfnRoute.WeightedTargetProperty | 
  Python | aws_cdk.aws_appmesh.CfnRoute.WeightedTargetProperty | 
  TypeScript  | aws-cdk-lib » aws_appmesh » CfnRoute » WeightedTargetProperty | 
An object that represents a target and its relative weight.
Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10. The total weight for all targets combined must be less than or equal to 100.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const weightedTargetProperty: appmesh.CfnRoute.WeightedTargetProperty = {
  virtualNode: 'virtualNode',
  weight: 123,
  // the properties below are optional
  port: 123,
};
Properties
| Name | Type | Description | 
|---|---|---|
| virtual | string | The virtual node to associate with the weighted target. | 
| weight | number | The relative weight of the weighted target. | 
| port? | number | The targeted port of the weighted object. | 
virtualNode
Type:
string
The virtual node to associate with the weighted target.
weight
Type:
number
The relative weight of the weighted target.
port?
Type:
number
(optional)
The targeted port of the weighted object.

 .NET
 Go
 Java
 Python
 TypeScript