public ContainerDefinition withDependsOn(ContainerDependency... dependsOn) {
        if (this.dependsOn == null) {
            setDependsOn(new java.util.ArrayList<ContainerDependency>(dependsOn.length));
        }
        for (ContainerDependency ele : dependsOn) {
            this.dependsOn.add(ele);
        }
        return this;
    }
<p>
Indicates that the container relies on the status of other containers in the same container group during its
startup and shutdown sequences. A container might have dependencies on multiple containers.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDependsOn(java.util.Collection)} or {@link #withDependsOn(java.util.Collection)} if you want to
override the existing values.
</p>

@param dependsOn
       Indicates that the container relies on the status of other containers in the same container group during
       its startup and shutdown sequences. A container might have dependencies on multiple containers.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/model/ContainerDefinition.java