public AwsEcsTaskDefinitionContainerDefinitionsDetails withExtraHosts(AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails... extraHosts) {
        if (this.extraHosts == null) {
            setExtraHosts(new java.util.ArrayList<AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails>(extraHosts.length));
        }
        for (AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails ele : extraHosts) {
            this.extraHosts.add(ele);
        }
        return this;
    }
<p>
A list of hostnames and IP address mappings to append to the <b>/etc/hosts</b> file on the container.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setExtraHosts(java.util.Collection)} or {@link #withExtraHosts(java.util.Collection)} if you want to
override the existing values.
</p>

@param extraHosts
       A list of hostnames and IP address mappings to append to the <b>/etc/hosts</b> file on the container.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-securityhub/src/main/java/com/amazonaws/services/securityhub/model/AwsEcsTaskDefinitionContainerDefinitionsDetails.java