public ContainerDefinition withImage(String image) {
        setImage(image);
        return this;
    }
<p>
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in
the Docker Hub registry are available. Other repositories are specified with either
<code> <i>repository-url</i>/<i>image</i>:<i>tag</i> </code> or
<code> <i>repository-url</i>/<i>image</i>@<i>digest</i> </code>. Up to 255 letters (uppercase and lowercase),
numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter
maps to <code>Image</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>IMAGE</code> parameter of
<a href="https://docs.docker.com/engine/reference/run/#security-configuration">docker run</a>.
</p>
<ul>
<li>
<p>
When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image and tag
for the container to use. However, subsequent updates to a repository image aren't propagated to already running
tasks.
</p>
</li>
<li>
<p>
Images in Amazon ECR repositories can be specified by either using the full <code>registry/repository:tag</code>
or <code>registry/repository@digest</code>. For example,
<code>012345678910.dkr.ecr.&lt;region-name&gt;.amazonaws.com/&lt;repository-name&gt;:latest</code> or
<code>012345678910.dkr.ecr.&lt;region-name&gt;.amazonaws.com/&lt;repository-name&gt;@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE</code>
.
</p>
</li>
<li>
<p>
Images in official repositories on Docker Hub use a single name (for example, <code>ubuntu</code> or
<code>mongo</code>).
</p>
</li>
<li>
<p>
Images in other repositories on Docker Hub are qualified with an organization name (for example,
<code>amazon/amazon-ecs-agent</code>).
</p>
</li>
<li>
<p>
Images in other online repositories are qualified further by a domain name (for example,
<code>quay.io/assemblyline/ubuntu</code>).
</p>
</li>
</ul>

@param image
       The image used to start a container. This string is passed directly to the Docker daemon. By default,
       images in the Docker Hub registry are available. Other repositories are specified with either
       <code> <i>repository-url</i>/<i>image</i>:<i>tag</i> </code> or
       <code> <i>repository-url</i>/<i>image</i>@<i>digest</i> </code>. Up to 255 letters (uppercase and
       lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed.
       This parameter maps to <code>Image</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>IMAGE</code> parameter of <a
       href="https://docs.docker.com/engine/reference/run/#security-configuration">docker run</a>.</p>
       <ul>
       <li>
       <p>
       When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image and
       tag for the container to use. However, subsequent updates to a repository image aren't propagated to
       already running tasks.
       </p>
       </li>
       <li>
       <p>
       Images in Amazon ECR repositories can be specified by either using the full
       <code>registry/repository:tag</code> or <code>registry/repository@digest</code>. For example,
       <code>012345678910.dkr.ecr.&lt;region-name&gt;.amazonaws.com/&lt;repository-name&gt;:latest</code> or
       <code>012345678910.dkr.ecr.&lt;region-name&gt;.amazonaws.com/&lt;repository-name&gt;@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE</code>
       .
       </p>
       </li>
       <li>
       <p>
       Images in official repositories on Docker Hub use a single name (for example, <code>ubuntu</code> or
       <code>mongo</code>).
       </p>
       </li>
       <li>
       <p>
       Images in other repositories on Docker Hub are qualified with an organization name (for example,
       <code>amazon/amazon-ecs-agent</code>).
       </p>
       </li>
       <li>
       <p>
       Images in other online repositories are qualified further by a domain name (for example,
       <code>quay.io/assemblyline/ubuntu</code>).
       </p>
       </li>
@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/ContainerDefinition.java