public java.util.List<HostEntry> getExtraHosts() {
        if (extraHosts == null) {
            extraHosts = new com.amazonaws.internal.SdkInternalList<HostEntry>();
        }
        return extraHosts;
    }
<p>
A list of hostnames and IP address mappings to append to the <code>/etc/hosts</code> file on the container. This
parameter maps to <code>ExtraHosts</code> in the <a
href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the
<a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--add-host</code> option
to <a href="https://docs.docker.com/engine/reference/run/#security-configuration">docker run</a>.
</p>
<note>
<p>
This parameter isn't supported for Windows containers or tasks that use the <code>awsvpc</code> network mode.
</p>
</note>

@return A list of hostnames and IP address mappings to append to the <code>/etc/hosts</code> file on the
        container. This parameter maps to <code>ExtraHosts</code> in the <a
        href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section
        of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the
        <code>--add-host</code> option to <a
        href="https://docs.docker.com/engine/reference/run/#security-configuration">docker run</a>.</p> <note>
        <p>
        This parameter isn't supported for Windows containers or tasks that use the <code>awsvpc</code> network
        mode.
        </p>
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/ContainerDefinition.java