NetworkWeightedTargetGroup Struct
A Target Group and weight combination.
| Source | aws-elasticloadbalancingv2/lib/nlb/network-listener-action.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
declare const networkTargetGroup: elbv2.NetworkTargetGroup;
const networkWeightedTargetGroup: elbv2.NetworkWeightedTargetGroup = {
targetGroup: networkTargetGroup,
// the properties below are optional
weight: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticloadbalancingv2 as elbv2
# network_target_group: elbv2.NetworkTargetGroup
network_weighted_target_group = elbv2.NetworkWeightedTargetGroup(
target_group=network_target_group,
# the properties below are optional
weight=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.elasticloadbalancingv2.*;
NetworkTargetGroup networkTargetGroup;
NetworkWeightedTargetGroup networkWeightedTargetGroup = NetworkWeightedTargetGroup.builder()
.targetGroup(networkTargetGroup)
// the properties below are optional
.weight(123)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
NetworkTargetGroup networkTargetGroup;
var networkWeightedTargetGroup = new NetworkWeightedTargetGroup {
TargetGroup = networkTargetGroup,
// the properties below are optional
Weight = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var networkTargetGroup NetworkTargetGroup
networkWeightedTargetGroup := &NetworkWeightedTargetGroup{
TargetGroup: networkTargetGroup,
// the properties below are optional
Weight: jsii.Number(123),
}
Properties
targetGroupINetworkTargetGrouptarget_groupINetworkTargetGrouptargetGroupINetworkTargetGroupTargetGroupINetworkTargetGroupTargetGroupINetworkTargetGroup required #The target group.
weightoptionalnumberweightoptionalint | floatweightoptionalNumberWeightoptionaldoubleWeightoptional*float64 = 1 #The target group's weight.
Range is [0..1000).