# WeightedTarget

Properties for the Weighted Targets in the route.

- Source: [`aws-appmesh/lib/route-spec.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appmesh/lib/route-spec.ts#L17)
- Type last changed: v2.88.0 · 20 Jul 2023

## Example

```ts
// 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';

declare const virtualNode: appmesh.VirtualNode;
const weightedTarget: appmesh.WeightedTarget = {
  virtualNode: virtualNode,

  // the properties below are optional
  port: 123,
  weight: 123,
};
```

## Properties

- `port`: number — The port to match from the request.

  **Default:** do not match on port

- `virtualNode`: [IVirtualNode](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.IVirtualNode.html) (required) — The VirtualNode the route points to.

- `weight`: number = 1 — The weight for the target.
