public UpdateServiceRequest withServiceRegistries(java.util.Collection<ServiceRegistry> serviceRegistries) {
        setServiceRegistries(serviceRegistries);
        return this;
    }
<p>
The details for the service discovery registries to assign to this service. For more information, see <a
href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.
</p>
<p>
When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the
updated service registries configuration, and then stops the old tasks when the new tasks are running.
</p>
<p>
You can remove existing <code>serviceRegistries</code> by passing an empty list.
</p>

@param serviceRegistries
       The details for the service discovery registries to assign to this service. For more information, see <a
       href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service
       Discovery</a>.</p>
       <p>
       When you add, update, or remove the service registries configuration, Amazon ECS starts new tasks with the
       updated service registries configuration, and then stops the old tasks when the new tasks are running.
       </p>
       <p>
       You can remove existing <code>serviceRegistries</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