aws-cdk-lib.aws_ecs.IEcsLoadBalancerTarget

interface IEcsLoadBalancerTarget

LanguageType name
.NETAmazon.CDK.AWS.ECS.IEcsLoadBalancerTarget
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecs#IEcsLoadBalancerTarget
Javasoftware.amazon.awscdk.services.ecs.IEcsLoadBalancerTarget
Pythonaws_cdk.aws_ecs.IEcsLoadBalancerTarget
TypeScript (source)aws-cdk-lib » aws_ecs » IEcsLoadBalancerTarget

Obtainable from BaseService.loadBalancerTarget(), ExternalService.loadBalancerTarget()

Interface for ECS load balancer target.

Properties

NameTypeDescription
connectionsConnectionsThe network connections associated with this resource.

connections

Type: Connections

The network connections associated with this resource.

Methods

NameDescription
attachToApplicationTargetGroup(targetGroup)Attach load-balanced target to a TargetGroup.
attachToClassicLB(loadBalancer)Attach load-balanced target to a classic ELB.
attachToNetworkTargetGroup(targetGroup)Attach load-balanced target to a TargetGroup.

attachToApplicationTargetGroup(targetGroup)

public attachToApplicationTargetGroup(targetGroup: IApplicationTargetGroup): LoadBalancerTargetProps

Parameters

  • targetGroup IApplicationTargetGroup

Returns

  • LoadBalancerTargetProps

Attach load-balanced target to a TargetGroup.

May return JSON to directly add to the [Targets] list, or return undefined if the target will register itself with the load balancer.


attachToClassicLB(loadBalancer)

public attachToClassicLB(loadBalancer: LoadBalancer): void

Parameters

  • loadBalancer LoadBalancer — [disable-awslint:ref-via-interface] The load balancer to attach the target to.

Attach load-balanced target to a classic ELB.


attachToNetworkTargetGroup(targetGroup)

public attachToNetworkTargetGroup(targetGroup: INetworkTargetGroup): LoadBalancerTargetProps

Parameters

  • targetGroup INetworkTargetGroup

Returns

  • LoadBalancerTargetProps

Attach load-balanced target to a TargetGroup.

May return JSON to directly add to the [Targets] list, or return undefined if the target will register itself with the load balancer.