public Task withCapacityProviderName(String capacityProviderName) {
        setCapacityProviderName(capacityProviderName);
        return this;
    }
<p>
The capacity provider that's associated with the task.
</p>

@param capacityProviderName
       The capacity provider that's associated with the task.
@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/Task.java