public UpdateServiceRequest withLoadBalancers(LoadBalancer... loadBalancers) {
        if (this.loadBalancers == null) {
            setLoadBalancers(new com.amazonaws.internal.SdkInternalList<LoadBalancer>(loadBalancers.length));
        }
        for (LoadBalancer ele : loadBalancers) {
            this.loadBalancers.add(ele);
        }
        return this;
    }
<p>
A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name,
and the container port to access from the load balancer. The container name is as it appears in a container
definition.
</p>
<p>
When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the updated
Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.
</p>
<p>
For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target groups. You
can update from a single target group to multiple target groups and from multiple target groups to a single
target group.
</p>
<p>
For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using
<code> <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html">CreateDeployment</a> </code>
through CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For more
information see <a
href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register
multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.
</p>
<p>
For services that use the external deployment controller, you can add, update, or remove load balancers by using
<a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html">CreateTaskSet</a>.
Note that multiple target groups are not supported for external deployments. For more information see <a
href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">Register
multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.
</p>
<p>
You can remove existing <code>loadBalancers</code> by passing an empty list.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setLoadBalancers(java.util.Collection)} or {@link #withLoadBalancers(java.util.Collection)} if you want
to override the existing values.
</p>

@param loadBalancers
       A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container
       name, and the container port to access from the load balancer. The container name is as it appears in a
       container definition.</p>
       <p>
       When you add, update, or remove a load balancer configuration, Amazon ECS starts new tasks with the
       updated Elastic Load Balancing configuration, and then stops the old tasks when the new tasks are running.
       </p>
       <p>
       For services that use rolling updates, you can add, update, or remove Elastic Load Balancing target
       groups. You can update from a single target group to multiple target groups and from multiple target
       groups to a single target group.
       </p>
       <p>
       For services that use blue/green deployments, you can update Elastic Load Balancing target groups by using
       <code> <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html">CreateDeployment</a> </code>
       through CodeDeploy. Note that multiple target groups are not supported for blue/green deployments. For
       more information see <a
       href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html"
       >Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer
       Guide</i>.
       </p>
       <p>
       For services that use the external deployment controller, you can add, update, or remove load balancers by
       using <a
       href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html">CreateTaskSet</a>.
       Note that multiple target groups are not supported for external deployments. For more information see <a
       href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html">
       Register multiple target groups with a service</a> in the <i>Amazon Elastic Container Service Developer
       Guide</i>.
       </p>
       <p>
       You can remove existing <code>loadBalancers</code> by passing an empty list.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/UpdateServiceRequest.java