aws-cdk-lib.aws_appmesh.CfnRoute.WeightedTargetProperty

interface WeightedTargetProperty

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.CfnRoute.WeightedTargetProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#CfnRoute_WeightedTargetProperty
Javasoftware.amazon.awscdk.services.appmesh.CfnRoute.WeightedTargetProperty
Pythonaws_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

NameTypeDescription
virtualNodestringThe virtual node to associate with the weighted target.
weightnumberThe relative weight of the weighted target.
port?numberThe 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.