Skip to content
v2.277.0

LoadBalancerTargetProps Struct ​

Result of attaching a target to load balancer.

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 targetJson: any;
const loadBalancerTargetProps: elbv2.LoadBalancerTargetProps = {
  targetType: elbv2.TargetType.INSTANCE,

  // the properties below are optional
  targetJson: targetJson,
};
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

# target_json: Any

load_balancer_target_props = elbv2.LoadBalancerTargetProps(
    target_type=elbv2.TargetType.INSTANCE,

    # the properties below are optional
    target_json=target_json
)
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.*;

Object targetJson;

LoadBalancerTargetProps loadBalancerTargetProps = LoadBalancerTargetProps.builder()
        .targetType(TargetType.INSTANCE)

        // the properties below are optional
        .targetJson(targetJson)
        .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;

var targetJson;

var loadBalancerTargetProps = new LoadBalancerTargetProps {
    TargetType = TargetType.INSTANCE,

    // the properties below are optional
    TargetJson = targetJson
};
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 targetJson interface{}

loadBalancerTargetProps := &LoadBalancerTargetProps{
	TargetType: awscdk.Aws_elasticloadbalancingv2.TargetType_INSTANCE,

	// the properties below are optional
	TargetJson: targetJson,
}

Properties ​

targetJsonoptionalanytarget_jsonoptionalAnytargetJsonoptionalObjectTargetJsonoptionalobjectTargetJsonoptionalinterface{} #
JSON representing the target's direct addition to the TargetGroup list.

May be omitted if the target is going to register itself later.

targetTypeTargetTypetarget_typeTargetTypetargetTypeTargetTypeTargetTypeTargetTypeTargetTypeTargetType required #
What kind of target this is.