# IEcsLoadBalancerTarget

Interface for ECS load balancer target.

Extends: IEcsLoadBalancerTarget
Extends: IApplicationLoadBalancerTarget, INetworkLoadBalancerTarget, ILoadBalancerTarget

- Source: [`aws-ecs/lib/base/base-service.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts#L236)

## Properties

- `connections`: [Connections](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Connections.html) — The network connections associated with this resource.

## Methods

- `attachToApplicationTargetGroup(targetGroup: IApplicationTargetGroup): 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: LoadBalancer): void` — Attach load-balanced target to a classic ELB.

  **Parameters**

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

- `attachToNetworkTargetGroup(targetGroup: INetworkTargetGroup): 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.
