public RegisterTaskDefinitionRequest withContainerDefinitions(ContainerDefinition... containerDefinitions) {
        if (this.containerDefinitions == null) {
            setContainerDefinitions(new com.amazonaws.internal.SdkInternalList<ContainerDefinition>(containerDefinitions.length));
        }
        for (ContainerDefinition ele : containerDefinitions) {
            this.containerDefinitions.add(ele);
        }
        return this;
    }
<p>
A list of container definitions in JSON format that describe the different containers that make up your task.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setContainerDefinitions(java.util.Collection)} or {@link #withContainerDefinitions(java.util.Collection)}
if you want to override the existing values.
</p>

@param containerDefinitions
       A list of container definitions in JSON format that describe the different containers that make up your
       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/RegisterTaskDefinitionRequest.java