aws-cdk-lib.aws_vpclattice.CfnRule.WeightedTargetGroupProperty

interface WeightedTargetGroupProperty

LanguageType name
.NETAmazon.CDK.AWS.VpcLattice.CfnRule.WeightedTargetGroupProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsvpclattice#CfnRule_WeightedTargetGroupProperty
Javasoftware.amazon.awscdk.services.vpclattice.CfnRule.WeightedTargetGroupProperty
Pythonaws_cdk.aws_vpclattice.CfnRule.WeightedTargetGroupProperty
TypeScript aws-cdk-lib » aws_vpclattice » CfnRule » WeightedTargetGroupProperty

Describes the weight of a target group.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_vpclattice as vpclattice } from 'aws-cdk-lib';
const weightedTargetGroupProperty: vpclattice.CfnRule.WeightedTargetGroupProperty = {
  targetGroupIdentifier: 'targetGroupIdentifier',

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

Properties

NameTypeDescription
targetGroupIdentifierstringThe ID of the target group.
weight?numberOnly required if you specify multiple target groups for a forward action.

targetGroupIdentifier

Type: string

The ID of the target group.


weight?

Type: number (optional)

Only required if you specify multiple target groups for a forward action.

The "weight" determines how requests are distributed to the target group. For example, if you specify two target groups, each with a weight of 10, each target group receives half the requests. If you specify two target groups, one with a weight of 10 and the other with a weight of 20, the target group with a weight of 20 receives twice as many requests as the other target group. If there's only one target group specified, then the default value is 100.