aws-cdk-lib.aws_vpclattice.CfnListener.ForwardProperty

interface ForwardProperty

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

The forward action.

Traffic that matches the rule is forwarded to the specified target groups.

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 forwardProperty: vpclattice.CfnListener.ForwardProperty = {
  targetGroups: [{
    targetGroupIdentifier: 'targetGroupIdentifier',

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

Properties

NameTypeDescription
targetGroupsIResolvable | IResolvable | WeightedTargetGroupProperty[]The target groups.

targetGroups

Type: IResolvable | IResolvable | WeightedTargetGroupProperty[]

The target groups.

Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of traffic will go to that target group.