public TaskContainerProperties withEnvironment(KeyValuePair... environment) {
        if (this.environment == null) {
            setEnvironment(new java.util.ArrayList<KeyValuePair>(environment.length));
        }
        for (KeyValuePair ele : environment) {
            this.environment.add(ele);
        }
        return this;
    }
<p>
The environment variables to pass to a container. This parameter maps to Env inthe <a
href="https://docs.docker.com/engine/api/v1.23/#create-a-container">Create a container</a> section of the <a
href="https://docs.docker.com/engine/api/v1.23/">Docker Remote API</a> and the <code>--env</code> parameter to <a
href="https://docs.docker.com/engine/reference/run/">docker run</a>.
</p>
<important>
<p>
We don't recommend using plaintext environment variables for sensitive information, such as credential data.
</p>
</important> <note>
<p>
Environment variables cannot start with <code>AWS_BATCH</code>. This naming convention is reserved for variables
that Batch sets.
</p>
</note>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setEnvironment(java.util.Collection)} or {@link #withEnvironment(java.util.Collection)} if you want to
override the existing values.
</p>

@param environment
       The environment variables to pass to a container. This parameter maps to Env inthe <a
       href="https://docs.docker.com/engine/api/v1.23/#create-a-container">Create a container</a> section of the
       <a href="https://docs.docker.com/engine/api/v1.23/">Docker Remote API</a> and the <code>--env</code>
       parameter to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. </p> <important>
       <p>
       We don't recommend using plaintext environment variables for sensitive information, such as credential
       data.
       </p>
       </important> <note>
       <p>
       Environment variables cannot start with <code>AWS_BATCH</code>. This naming convention is reserved for
       variables that Batch sets.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-batch/src/main/java/com/amazonaws/services/batch/model/TaskContainerProperties.java