public String getMemory() {
        return this.memory;
    }
<p>
The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed as an
integer using MiB (for example, <code>1024</code>). If it's expressed as a string using GB (for example,
<code>1GB</code> or <code>1 GB</code>), it's converted to an integer indicating the MiB when the task definition
is registered.
</p>
<p>
If you use the EC2 launch type, this field is optional.
</p>
<p>
If you use the Fargate launch type, this field is required. You must use one of the following values. The value
that you choose determines the range of supported values for the <code>cpu</code> parameter.
</p>
<ul>
<li>
<p>
512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)
</p>
</li>
<li>
<p>
1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)
</p>
</li>
<li>
<p>
2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
<code>cpu</code> values: 1024 (1 vCPU)
</p>
</li>
<li>
<p>
Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2
vCPU)
</p>
</li>
<li>
<p>
Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4
vCPU)
</p>
</li>
<li>
<p>
Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)
</p>
<p>
This option requires Linux platform <code>1.4.0</code> or later.
</p>
</li>
<li>
<p>
Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)
</p>
<p>
This option requires Linux platform <code>1.4.0</code> or later.
</p>
</li>
</ul>

@return The amount of memory (in MiB) that the task uses as expressed in a task definition. It can be expressed
        as an integer using MiB (for example, <code>1024</code>). If it's expressed as a string using GB (for
        example, <code>1GB</code> or <code>1 GB</code>), it's converted to an integer indicating the MiB when the
        task definition is registered.</p>
        <p>
        If you use the EC2 launch type, this field is optional.
        </p>
        <p>
        If you use the Fargate launch type, this field is required. You must use one of the following values. The
        value that you choose determines the range of supported values for the <code>cpu</code> parameter.
        </p>
        <ul>
        <li>
        <p>
        512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)
        </p>
        </li>
        <li>
        <p>
        1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)
        </p>
        </li>
        <li>
        <p>
        2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available
        <code>cpu</code> values: 1024 (1 vCPU)
        </p>
        </li>
        <li>
        <p>
        Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values:
        2048 (2 vCPU)
        </p>
        </li>
        <li>
        <p>
        Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values:
        4096 (4 vCPU)
        </p>
        </li>
        <li>
        <p>
        Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)
        </p>
        <p>
        This option requires Linux platform <code>1.4.0</code> or later.
        </p>
        </li>
        <li>
        <p>
        Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)
        </p>
        <p>
        This option requires Linux platform <code>1.4.0</code> or later.
        </p>
        </li>
aws-java-sdk-ecs/src/main/java/com/amazonaws/services/ecs/model/Task.java