All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.batch.model.TaskContainerDetails Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Batch module holds the client classes that are used for communicating with AWS Batch.

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.batch.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The details for the container in this task attempt. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TaskContainerDetails implements Serializable, Cloneable, StructuredPojo { /** *

* The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to * docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd. *

*/ private java.util.List command; /** *

* A list of containers that this container depends on. *

*/ private java.util.List dependsOn; /** *

* The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run. *

* *

* We don't recommend using plaintext environment variables for sensitive information, such as credential data. *

*
*/ private java.util.List environment; /** *

* If the essential parameter of a container is marked as true, and that container fails or stops for * any reason, all other containers that are part of the task are stopped. If the essential parameter * of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this * parameter is omitted, a container is assumed to be essential. *

*

* All jobs must have at least one essential container. If you have an application that's composed of multiple * containers, group containers that are used for a common purpose into components, and separate the different * components into multiple task definitions. For more information, see Application * Architecture in the Amazon Elastic Container Service Developer Guide. *

*/ private Boolean essential; /** *

* 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 * repository-url/image:tag or repository-url/image@digest. Up to 255 letters (uppercase * and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. * This parameter maps to Image in the Create a container section of the * Docker Remote API and the IMAGE parameter of * the docker run . *

*/ private String image; /** *

* Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more * information, see KernelCapabilities * . *

* *

* This parameter is not supported for Windows containers. *

*
*/ private LinuxParameters linuxParameters; /** *

* The log configuration specification for the container. *

*

* This parameter maps to LogConfig in the Create a container section of the * Docker Remote API and the --log-driver * option to docker run. *

*

* By default, containers use the same logging driver that the Docker daemon uses. However the container can use a * different logging driver than the Docker daemon by specifying a log driver with this parameter in the container * definition. To use a different logging driver for a container, the log system must be configured properly on the * container instance (or on a different log server for remote logging options). For more information about the * options for different supported log drivers, see Configure logging drivers in the Docker * documentation. *

* *

* Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of the * Amazon ECS container agent. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* The Amazon ECS container agent running on a container instance must register the logging drivers available on * that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed * on that instance can use these log configuration options. For more information, see Amazon ECS container * agent configuration in the Amazon Elastic Container Service Developer Guide. *

*
*/ private LogConfiguration logConfiguration; /** *

* The mount points for data volumes in your container. *

*

* This parameter maps to Volumes in the Create a container section of the * Docker Remote API and the --volume option * to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers can't mount directories on a different drive, and mount point can't be across drives. *

*/ private java.util.List mountPoints; /** *

* The name of a container. *

*/ private String name; /** *

* When this parameter is true, the container is given elevated privileges on the host container * instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the * Docker Remote API and the --privileged * option to docker run. *

* *

* This parameter is not supported for Windows containers or tasks run on Fargate. *

*
*/ private Boolean privileged; /** *

* When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a container section of the * Docker Remote API and the --read-only option * to docker run. *

* *

* This parameter is not supported for Windows containers. *

*
*/ private Boolean readonlyRootFilesystem; /** *

* The private repository authentication credentials to use. *

*/ private RepositoryCredentials repositoryCredentials; /** *

* The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

*/ private java.util.List resourceRequirements; /** *

* The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

*/ private java.util.List secrets; /** *

* A list of ulimits to set in the container. If a ulimit value is specified in a task * definition, it overrides the default values set by Docker. This parameter maps to Ulimits in the Create a container section of the * Docker Remote API and the --ulimit option to * docker run. *

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The nofile resource limit * sets a restriction on the number of open files that a container can use. The default nofile soft * limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

*
*/ private java.util.List ulimits; /** *

* The user to use inside the container. This parameter maps to User in the Create a container section of the Docker * Remote API and the --user option to docker run. *

* *

* When running tasks using the host network mode, don't run containers using the * root user (UID 0). We recommend using a non-root user for better security. *

*
*

* You can specify the user using the following formats. If specifying a UID or GID, you must specify * it as a positive integer. *

*
    *
  • *

    * user *

    *
  • *
  • *

    * user:group *

    *
  • *
  • *

    * uid *

    *
  • *
  • *

    * uid:gid *

    *
  • *
  • *

    * user:gi *

    *
  • *
  • *

    * uid:group *

    *
  • *
  • *

    * *

    *
  • *
* *

* This parameter is not supported for Windows containers. *

*
*/ private String user; /** *

* The exit code returned upon completion. *

*/ private Integer exitCode; /** *

* A short (255 max characters) human-readable string to provide additional details for a running or stopped * container. *

*/ private String reason; /** *

* The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is * /aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING * status. *

*/ private String logStreamName; /** *

* The network interfaces that are associated with the job. *

*/ private java.util.List networkInterfaces; /** *

* The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to * docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd. *

* * @return The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the * Docker Remote API and the COMMAND * parameter to docker run. For more * information, see https://docs.docker.com/engine * /reference/builder/#cmd. */ public java.util.List getCommand() { return command; } /** *

* The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to * docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd. *

* * @param command * The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the * Docker Remote API and the COMMAND * parameter to docker run. For more information, * see https://docs.docker.com/engine/reference * /builder/#cmd. */ public void setCommand(java.util.Collection command) { if (command == null) { this.command = null; return; } this.command = new java.util.ArrayList(command); } /** *

* The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to * docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setCommand(java.util.Collection)} or {@link #withCommand(java.util.Collection)} if you want to override * the existing values. *

* * @param command * The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the * Docker Remote API and the COMMAND * parameter to docker run. For more information, * see https://docs.docker.com/engine/reference * /builder/#cmd. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withCommand(String... command) { if (this.command == null) { setCommand(new java.util.ArrayList(command.length)); } for (String ele : command) { this.command.add(ele); } return this; } /** *

* The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to * docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd. *

* * @param command * The command that's passed to the container. This parameter maps to Cmd in the Create a container section of the * Docker Remote API and the COMMAND * parameter to docker run. For more information, * see https://docs.docker.com/engine/reference * /builder/#cmd. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withCommand(java.util.Collection command) { setCommand(command); return this; } /** *

* A list of containers that this container depends on. *

* * @return A list of containers that this container depends on. */ public java.util.List getDependsOn() { return dependsOn; } /** *

* A list of containers that this container depends on. *

* * @param dependsOn * A list of containers that this container depends on. */ public void setDependsOn(java.util.Collection dependsOn) { if (dependsOn == null) { this.dependsOn = null; return; } this.dependsOn = new java.util.ArrayList(dependsOn); } /** *

* A list of containers that this container depends on. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setDependsOn(java.util.Collection)} or {@link #withDependsOn(java.util.Collection)} if you want to * override the existing values. *

* * @param dependsOn * A list of containers that this container depends on. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withDependsOn(TaskContainerDependency... dependsOn) { if (this.dependsOn == null) { setDependsOn(new java.util.ArrayList(dependsOn.length)); } for (TaskContainerDependency ele : dependsOn) { this.dependsOn.add(ele); } return this; } /** *

* A list of containers that this container depends on. *

* * @param dependsOn * A list of containers that this container depends on. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withDependsOn(java.util.Collection dependsOn) { setDependsOn(dependsOn); return this; } /** *

* The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run. *

* *

* We don't recommend using plaintext environment variables for sensitive information, such as credential data. *

*
* * @return The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the * Docker Remote API and the --env * option to docker run.

*

* We don't recommend using plaintext environment variables for sensitive information, such as credential * data. *

*/ public java.util.List getEnvironment() { return environment; } /** *

* The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run. *

* *

* We don't recommend using plaintext environment variables for sensitive information, such as credential data. *

*
* * @param environment * The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the * Docker Remote API and the --env * option to docker run.

*

* We don't recommend using plaintext environment variables for sensitive information, such as credential * data. *

*/ public void setEnvironment(java.util.Collection environment) { if (environment == null) { this.environment = null; return; } this.environment = new java.util.ArrayList(environment); } /** *

* The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run. *

* *

* We don't recommend using plaintext environment variables for sensitive information, such as credential data. *

*
*

* NOTE: 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. *

* * @param environment * The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the * Docker Remote API and the --env * option to docker run.

*

* We don't recommend using plaintext environment variables for sensitive information, such as credential * data. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withEnvironment(KeyValuePair... environment) { if (this.environment == null) { setEnvironment(new java.util.ArrayList(environment.length)); } for (KeyValuePair ele : environment) { this.environment.add(ele); } return this; } /** *

* The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run. *

* *

* We don't recommend using plaintext environment variables for sensitive information, such as credential data. *

*
* * @param environment * The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the * Docker Remote API and the --env * option to docker run.

*

* We don't recommend using plaintext environment variables for sensitive information, such as credential * data. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withEnvironment(java.util.Collection environment) { setEnvironment(environment); return this; } /** *

* If the essential parameter of a container is marked as true, and that container fails or stops for * any reason, all other containers that are part of the task are stopped. If the essential parameter * of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this * parameter is omitted, a container is assumed to be essential. *

*

* All jobs must have at least one essential container. If you have an application that's composed of multiple * containers, group containers that are used for a common purpose into components, and separate the different * components into multiple task definitions. For more information, see Application * Architecture in the Amazon Elastic Container Service Developer Guide. *

* * @param essential * If the essential parameter of a container is marked as true, and that container fails or * stops for any reason, all other containers that are part of the task are stopped. If the * essential parameter of a container is marked as false, its failure doesn't affect the rest of * the containers in a task. If this parameter is omitted, a container is assumed to be essential.

*

* All jobs must have at least one essential container. If you have an application that's composed of * multiple containers, group containers that are used for a common purpose into components, and separate the * different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide. */ public void setEssential(Boolean essential) { this.essential = essential; } /** *

* If the essential parameter of a container is marked as true, and that container fails or stops for * any reason, all other containers that are part of the task are stopped. If the essential parameter * of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this * parameter is omitted, a container is assumed to be essential. *

*

* All jobs must have at least one essential container. If you have an application that's composed of multiple * containers, group containers that are used for a common purpose into components, and separate the different * components into multiple task definitions. For more information, see Application * Architecture in the Amazon Elastic Container Service Developer Guide. *

* * @return If the essential parameter of a container is marked as true, and that container fails or * stops for any reason, all other containers that are part of the task are stopped. If the * essential parameter of a container is marked as false, its failure doesn't affect the rest * of the containers in a task. If this parameter is omitted, a container is assumed to be essential.

*

* All jobs must have at least one essential container. If you have an application that's composed of * multiple containers, group containers that are used for a common purpose into components, and separate * the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide. */ public Boolean getEssential() { return this.essential; } /** *

* If the essential parameter of a container is marked as true, and that container fails or stops for * any reason, all other containers that are part of the task are stopped. If the essential parameter * of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this * parameter is omitted, a container is assumed to be essential. *

*

* All jobs must have at least one essential container. If you have an application that's composed of multiple * containers, group containers that are used for a common purpose into components, and separate the different * components into multiple task definitions. For more information, see Application * Architecture in the Amazon Elastic Container Service Developer Guide. *

* * @param essential * If the essential parameter of a container is marked as true, and that container fails or * stops for any reason, all other containers that are part of the task are stopped. If the * essential parameter of a container is marked as false, its failure doesn't affect the rest of * the containers in a task. If this parameter is omitted, a container is assumed to be essential.

*

* All jobs must have at least one essential container. If you have an application that's composed of * multiple containers, group containers that are used for a common purpose into components, and separate the * different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withEssential(Boolean essential) { setEssential(essential); return this; } /** *

* If the essential parameter of a container is marked as true, and that container fails or stops for * any reason, all other containers that are part of the task are stopped. If the essential parameter * of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this * parameter is omitted, a container is assumed to be essential. *

*

* All jobs must have at least one essential container. If you have an application that's composed of multiple * containers, group containers that are used for a common purpose into components, and separate the different * components into multiple task definitions. For more information, see Application * Architecture in the Amazon Elastic Container Service Developer Guide. *

* * @return If the essential parameter of a container is marked as true, and that container fails or * stops for any reason, all other containers that are part of the task are stopped. If the * essential parameter of a container is marked as false, its failure doesn't affect the rest * of the containers in a task. If this parameter is omitted, a container is assumed to be essential.

*

* All jobs must have at least one essential container. If you have an application that's composed of * multiple containers, group containers that are used for a common purpose into components, and separate * the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide. */ public Boolean isEssential() { return this.essential; } /** *

* 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 * repository-url/image:tag or repository-url/image@digest. Up to 255 letters (uppercase * and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. * This parameter maps to Image in the Create a container section of the * Docker Remote API and the IMAGE parameter of * the docker run . *

* * @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 * repository-url/image:tag or repository-url/image@digest. Up to 255 letters * (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number * signs are allowed. This parameter maps to Image in the Create a container section * of the Docker Remote API and the * IMAGE parameter of the docker run . */ public void setImage(String image) { this.image = 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 * repository-url/image:tag or repository-url/image@digest. Up to 255 letters (uppercase * and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. * This parameter maps to Image in the Create a container section of the * Docker Remote API and the IMAGE parameter of * the docker run . *

* * @return 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 * repository-url/image:tag or repository-url/image@digest. Up to 255 letters * (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number * signs are allowed. This parameter maps to Image in the Create a container section * of the Docker Remote API and the * IMAGE parameter of the docker run . */ public String getImage() { return this.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 * repository-url/image:tag or repository-url/image@digest. Up to 255 letters (uppercase * and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. * This parameter maps to Image in the Create a container section of the * Docker Remote API and the IMAGE parameter of * the docker run . *

* * @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 * repository-url/image:tag or repository-url/image@digest. Up to 255 letters * (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number * signs are allowed. This parameter maps to Image in the Create a container section * of the Docker Remote API and the * IMAGE parameter of the docker run . * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withImage(String image) { setImage(image); return this; } /** *

* Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more * information, see KernelCapabilities * . *

* *

* This parameter is not supported for Windows containers. *

*
* * @param linuxParameters * Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For * more information, see KernelCapabilities.

*

* This parameter is not supported for Windows containers. *

*/ public void setLinuxParameters(LinuxParameters linuxParameters) { this.linuxParameters = linuxParameters; } /** *

* Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more * information, see KernelCapabilities * . *

* *

* This parameter is not supported for Windows containers. *

*
* * @return Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For * more information, see KernelCapabilities.

*

* This parameter is not supported for Windows containers. *

*/ public LinuxParameters getLinuxParameters() { return this.linuxParameters; } /** *

* Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more * information, see KernelCapabilities * . *

* *

* This parameter is not supported for Windows containers. *

*
* * @param linuxParameters * Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For * more information, see KernelCapabilities.

*

* This parameter is not supported for Windows containers. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withLinuxParameters(LinuxParameters linuxParameters) { setLinuxParameters(linuxParameters); return this; } /** *

* The log configuration specification for the container. *

*

* This parameter maps to LogConfig in the Create a container section of the * Docker Remote API and the --log-driver * option to docker run. *

*

* By default, containers use the same logging driver that the Docker daemon uses. However the container can use a * different logging driver than the Docker daemon by specifying a log driver with this parameter in the container * definition. To use a different logging driver for a container, the log system must be configured properly on the * container instance (or on a different log server for remote logging options). For more information about the * options for different supported log drivers, see Configure logging drivers in the Docker * documentation. *

* *

* Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of the * Amazon ECS container agent. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* The Amazon ECS container agent running on a container instance must register the logging drivers available on * that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed * on that instance can use these log configuration options. For more information, see Amazon ECS container * agent configuration in the Amazon Elastic Container Service Developer Guide. *

*
* * @param logConfiguration * The log configuration specification for the container.

*

* This parameter maps to LogConfig in the Create a container section * of the Docker Remote API and the * --log-driver option to docker run. *

*

* By default, containers use the same logging driver that the Docker daemon uses. However the container can * use a different logging driver than the Docker daemon by specifying a log driver with this parameter in * the container definition. To use a different logging driver for a container, the log system must be * configured properly on the container instance (or on a different log server for remote logging options). * For more information about the options for different supported log drivers, see Configure logging drivers in the * Docker documentation. *

* *

* Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of * the Amazon ECS container agent. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* The Amazon ECS container agent running on a container instance must register the logging drivers available * on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before * containers placed on that instance can use these log configuration options. For more information, see Amazon ECS * container agent configuration in the Amazon Elastic Container Service Developer Guide. *

*/ public void setLogConfiguration(LogConfiguration logConfiguration) { this.logConfiguration = logConfiguration; } /** *

* The log configuration specification for the container. *

*

* This parameter maps to LogConfig in the Create a container section of the * Docker Remote API and the --log-driver * option to docker run. *

*

* By default, containers use the same logging driver that the Docker daemon uses. However the container can use a * different logging driver than the Docker daemon by specifying a log driver with this parameter in the container * definition. To use a different logging driver for a container, the log system must be configured properly on the * container instance (or on a different log server for remote logging options). For more information about the * options for different supported log drivers, see Configure logging drivers in the Docker * documentation. *

* *

* Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of the * Amazon ECS container agent. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* The Amazon ECS container agent running on a container instance must register the logging drivers available on * that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed * on that instance can use these log configuration options. For more information, see Amazon ECS container * agent configuration in the Amazon Elastic Container Service Developer Guide. *

*
* * @return The log configuration specification for the container.

*

* This parameter maps to LogConfig in the Create a container section * of the Docker Remote API and the * --log-driver option to docker run. *

*

* By default, containers use the same logging driver that the Docker daemon uses. However the container can * use a different logging driver than the Docker daemon by specifying a log driver with this parameter in * the container definition. To use a different logging driver for a container, the log system must be * configured properly on the container instance (or on a different log server for remote logging options). * For more information about the options for different supported log drivers, see Configure logging drivers in the * Docker documentation. *

* *

* Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in * the LogConfiguration data type). Additional log drivers may be available in future releases * of the Amazon ECS container agent. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* The Amazon ECS container agent running on a container instance must register the logging drivers * available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable * before containers placed on that instance can use these log configuration options. For more information, * see Amazon * ECS container agent configuration in the Amazon Elastic Container Service Developer Guide. *

*/ public LogConfiguration getLogConfiguration() { return this.logConfiguration; } /** *

* The log configuration specification for the container. *

*

* This parameter maps to LogConfig in the Create a container section of the * Docker Remote API and the --log-driver * option to docker run. *

*

* By default, containers use the same logging driver that the Docker daemon uses. However the container can use a * different logging driver than the Docker daemon by specifying a log driver with this parameter in the container * definition. To use a different logging driver for a container, the log system must be configured properly on the * container instance (or on a different log server for remote logging options). For more information about the * options for different supported log drivers, see Configure logging drivers in the Docker * documentation. *

* *

* Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of the * Amazon ECS container agent. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* The Amazon ECS container agent running on a container instance must register the logging drivers available on * that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed * on that instance can use these log configuration options. For more information, see Amazon ECS container * agent configuration in the Amazon Elastic Container Service Developer Guide. *

*
* * @param logConfiguration * The log configuration specification for the container.

*

* This parameter maps to LogConfig in the Create a container section * of the Docker Remote API and the * --log-driver option to docker run. *

*

* By default, containers use the same logging driver that the Docker daemon uses. However the container can * use a different logging driver than the Docker daemon by specifying a log driver with this parameter in * the container definition. To use a different logging driver for a container, the log system must be * configured properly on the container instance (or on a different log server for remote logging options). * For more information about the options for different supported log drivers, see Configure logging drivers in the * Docker documentation. *

* *

* Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of * the Amazon ECS container agent. *

*
*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* The Amazon ECS container agent running on a container instance must register the logging drivers available * on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before * containers placed on that instance can use these log configuration options. For more information, see Amazon ECS * container agent configuration in the Amazon Elastic Container Service Developer Guide. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withLogConfiguration(LogConfiguration logConfiguration) { setLogConfiguration(logConfiguration); return this; } /** *

* The mount points for data volumes in your container. *

*

* This parameter maps to Volumes in the Create a container section of the * Docker Remote API and the --volume option * to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers can't mount directories on a different drive, and mount point can't be across drives. *

* * @return The mount points for data volumes in your container.

*

* This parameter maps to Volumes in the Create a container section * of the Docker Remote API and the --volume option to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. * Windows containers can't mount directories on a different drive, and mount point can't be across drives. */ public java.util.List getMountPoints() { return mountPoints; } /** *

* The mount points for data volumes in your container. *

*

* This parameter maps to Volumes in the Create a container section of the * Docker Remote API and the --volume option * to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers can't mount directories on a different drive, and mount point can't be across drives. *

* * @param mountPoints * The mount points for data volumes in your container.

*

* This parameter maps to Volumes in the Create a container section * of the Docker Remote API and the --volume option to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers can't mount directories on a different drive, and mount point can't be across drives. */ public void setMountPoints(java.util.Collection mountPoints) { if (mountPoints == null) { this.mountPoints = null; return; } this.mountPoints = new java.util.ArrayList(mountPoints); } /** *

* The mount points for data volumes in your container. *

*

* This parameter maps to Volumes in the Create a container section of the * Docker Remote API and the --volume option * to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers can't mount directories on a different drive, and mount point can't be across drives. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMountPoints(java.util.Collection)} or {@link #withMountPoints(java.util.Collection)} if you want to * override the existing values. *

* * @param mountPoints * The mount points for data volumes in your container.

*

* This parameter maps to Volumes in the Create a container section * of the Docker Remote API and the --volume option to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers can't mount directories on a different drive, and mount point can't be across drives. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withMountPoints(MountPoint... mountPoints) { if (this.mountPoints == null) { setMountPoints(new java.util.ArrayList(mountPoints.length)); } for (MountPoint ele : mountPoints) { this.mountPoints.add(ele); } return this; } /** *

* The mount points for data volumes in your container. *

*

* This parameter maps to Volumes in the Create a container section of the * Docker Remote API and the --volume option * to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers can't mount directories on a different drive, and mount point can't be across drives. *

* * @param mountPoints * The mount points for data volumes in your container.

*

* This parameter maps to Volumes in the Create a container section * of the Docker Remote API and the --volume option to docker run. *

*

* Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers can't mount directories on a different drive, and mount point can't be across drives. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withMountPoints(java.util.Collection mountPoints) { setMountPoints(mountPoints); return this; } /** *

* The name of a container. *

* * @param name * The name of a container. */ public void setName(String name) { this.name = name; } /** *

* The name of a container. *

* * @return The name of a container. */ public String getName() { return this.name; } /** *

* The name of a container. *

* * @param name * The name of a container. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withName(String name) { setName(name); return this; } /** *

* When this parameter is true, the container is given elevated privileges on the host container * instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the * Docker Remote API and the --privileged * option to docker run. *

* *

* This parameter is not supported for Windows containers or tasks run on Fargate. *

*
* * @param privileged * When this parameter is true, the container is given elevated privileges on the host container * instance (similar to the root user). This parameter maps to Privileged in the Create a container section * of the Docker Remote API and the * --privileged option to docker run.

*

* This parameter is not supported for Windows containers or tasks run on Fargate. *

*/ public void setPrivileged(Boolean privileged) { this.privileged = privileged; } /** *

* When this parameter is true, the container is given elevated privileges on the host container * instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the * Docker Remote API and the --privileged * option to docker run. *

* *

* This parameter is not supported for Windows containers or tasks run on Fargate. *

*
* * @return When this parameter is true, the container is given elevated privileges on the host * container instance (similar to the root user). This parameter maps to * Privileged in the Create a container section * of the Docker Remote API and the * --privileged option to docker run.

*

* This parameter is not supported for Windows containers or tasks run on Fargate. *

*/ public Boolean getPrivileged() { return this.privileged; } /** *

* When this parameter is true, the container is given elevated privileges on the host container * instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the * Docker Remote API and the --privileged * option to docker run. *

* *

* This parameter is not supported for Windows containers or tasks run on Fargate. *

*
* * @param privileged * When this parameter is true, the container is given elevated privileges on the host container * instance (similar to the root user). This parameter maps to Privileged in the Create a container section * of the Docker Remote API and the * --privileged option to docker run.

*

* This parameter is not supported for Windows containers or tasks run on Fargate. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withPrivileged(Boolean privileged) { setPrivileged(privileged); return this; } /** *

* When this parameter is true, the container is given elevated privileges on the host container * instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the * Docker Remote API and the --privileged * option to docker run. *

* *

* This parameter is not supported for Windows containers or tasks run on Fargate. *

*
* * @return When this parameter is true, the container is given elevated privileges on the host * container instance (similar to the root user). This parameter maps to * Privileged in the Create a container section * of the Docker Remote API and the * --privileged option to docker run.

*

* This parameter is not supported for Windows containers or tasks run on Fargate. *

*/ public Boolean isPrivileged() { return this.privileged; } /** *

* When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a container section of the * Docker Remote API and the --read-only option * to docker run. *

* *

* This parameter is not supported for Windows containers. *

*
* * @param readonlyRootFilesystem * When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a container section * of the Docker Remote API and the * --read-only option to docker run.

*

* This parameter is not supported for Windows containers. *

*/ public void setReadonlyRootFilesystem(Boolean readonlyRootFilesystem) { this.readonlyRootFilesystem = readonlyRootFilesystem; } /** *

* When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a container section of the * Docker Remote API and the --read-only option * to docker run. *

* *

* This parameter is not supported for Windows containers. *

*
* * @return When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a container section * of the Docker Remote API and the * --read-only option to docker run.

*

* This parameter is not supported for Windows containers. *

*/ public Boolean getReadonlyRootFilesystem() { return this.readonlyRootFilesystem; } /** *

* When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a container section of the * Docker Remote API and the --read-only option * to docker run. *

* *

* This parameter is not supported for Windows containers. *

*
* * @param readonlyRootFilesystem * When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a container section * of the Docker Remote API and the * --read-only option to docker run.

*

* This parameter is not supported for Windows containers. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withReadonlyRootFilesystem(Boolean readonlyRootFilesystem) { setReadonlyRootFilesystem(readonlyRootFilesystem); return this; } /** *

* When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a container section of the * Docker Remote API and the --read-only option * to docker run. *

* *

* This parameter is not supported for Windows containers. *

*
* * @return When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a container section * of the Docker Remote API and the * --read-only option to docker run.

*

* This parameter is not supported for Windows containers. *

*/ public Boolean isReadonlyRootFilesystem() { return this.readonlyRootFilesystem; } /** *

* The private repository authentication credentials to use. *

* * @param repositoryCredentials * The private repository authentication credentials to use. */ public void setRepositoryCredentials(RepositoryCredentials repositoryCredentials) { this.repositoryCredentials = repositoryCredentials; } /** *

* The private repository authentication credentials to use. *

* * @return The private repository authentication credentials to use. */ public RepositoryCredentials getRepositoryCredentials() { return this.repositoryCredentials; } /** *

* The private repository authentication credentials to use. *

* * @param repositoryCredentials * The private repository authentication credentials to use. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withRepositoryCredentials(RepositoryCredentials repositoryCredentials) { setRepositoryCredentials(repositoryCredentials); return this; } /** *

* The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

* * @return The type and amount of a resource to assign to a container. The only supported resource is a GPU. */ public java.util.List getResourceRequirements() { return resourceRequirements; } /** *

* The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

* * @param resourceRequirements * The type and amount of a resource to assign to a container. The only supported resource is a GPU. */ public void setResourceRequirements(java.util.Collection resourceRequirements) { if (resourceRequirements == null) { this.resourceRequirements = null; return; } this.resourceRequirements = new java.util.ArrayList(resourceRequirements); } /** *

* The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setResourceRequirements(java.util.Collection)} or {@link #withResourceRequirements(java.util.Collection)} * if you want to override the existing values. *

* * @param resourceRequirements * The type and amount of a resource to assign to a container. The only supported resource is a GPU. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withResourceRequirements(ResourceRequirement... resourceRequirements) { if (this.resourceRequirements == null) { setResourceRequirements(new java.util.ArrayList(resourceRequirements.length)); } for (ResourceRequirement ele : resourceRequirements) { this.resourceRequirements.add(ele); } return this; } /** *

* The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

* * @param resourceRequirements * The type and amount of a resource to assign to a container. The only supported resource is a GPU. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withResourceRequirements(java.util.Collection resourceRequirements) { setResourceRequirements(resourceRequirements); return this; } /** *

* The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

* * @return The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. */ public java.util.List getSecrets() { return secrets; } /** *

* The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

* * @param secrets * The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. */ public void setSecrets(java.util.Collection secrets) { if (secrets == null) { this.secrets = null; return; } this.secrets = new java.util.ArrayList(secrets); } /** *

* The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecrets(java.util.Collection)} or {@link #withSecrets(java.util.Collection)} if you want to override * the existing values. *

* * @param secrets * The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withSecrets(Secret... secrets) { if (this.secrets == null) { setSecrets(new java.util.ArrayList(secrets.length)); } for (Secret ele : secrets) { this.secrets.add(ele); } return this; } /** *

* The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

* * @param secrets * The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withSecrets(java.util.Collection secrets) { setSecrets(secrets); return this; } /** *

* A list of ulimits to set in the container. If a ulimit value is specified in a task * definition, it overrides the default values set by Docker. This parameter maps to Ulimits in the Create a container section of the * Docker Remote API and the --ulimit option to * docker run. *

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The nofile resource limit * sets a restriction on the number of open files that a container can use. The default nofile soft * limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

*
* * @return A list of ulimits to set in the container. If a ulimit value is specified in a * task definition, it overrides the default values set by Docker. This parameter maps to * Ulimits in the Create a container section * of the Docker Remote API and the * --ulimit option to docker run.

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with * the exception of the nofile resource limit parameter which Fargate overrides. The nofile * resource limit sets a restriction on the number of open files that a container can use. The default * nofile soft limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

*/ public java.util.List getUlimits() { return ulimits; } /** *

* A list of ulimits to set in the container. If a ulimit value is specified in a task * definition, it overrides the default values set by Docker. This parameter maps to Ulimits in the Create a container section of the * Docker Remote API and the --ulimit option to * docker run. *

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The nofile resource limit * sets a restriction on the number of open files that a container can use. The default nofile soft * limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

*
* * @param ulimits * A list of ulimits to set in the container. If a ulimit value is specified in a * task definition, it overrides the default values set by Docker. This parameter maps to * Ulimits in the Create a container section * of the Docker Remote API and the * --ulimit option to docker run.

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with * the exception of the nofile resource limit parameter which Fargate overrides. The nofile * resource limit sets a restriction on the number of open files that a container can use. The default * nofile soft limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

*/ public void setUlimits(java.util.Collection ulimits) { if (ulimits == null) { this.ulimits = null; return; } this.ulimits = new java.util.ArrayList(ulimits); } /** *

* A list of ulimits to set in the container. If a ulimit value is specified in a task * definition, it overrides the default values set by Docker. This parameter maps to Ulimits in the Create a container section of the * Docker Remote API and the --ulimit option to * docker run. *

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The nofile resource limit * sets a restriction on the number of open files that a container can use. The default nofile soft * limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

*
*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setUlimits(java.util.Collection)} or {@link #withUlimits(java.util.Collection)} if you want to override * the existing values. *

* * @param ulimits * A list of ulimits to set in the container. If a ulimit value is specified in a * task definition, it overrides the default values set by Docker. This parameter maps to * Ulimits in the Create a container section * of the Docker Remote API and the * --ulimit option to docker run.

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with * the exception of the nofile resource limit parameter which Fargate overrides. The nofile * resource limit sets a restriction on the number of open files that a container can use. The default * nofile soft limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withUlimits(Ulimit... ulimits) { if (this.ulimits == null) { setUlimits(new java.util.ArrayList(ulimits.length)); } for (Ulimit ele : ulimits) { this.ulimits.add(ele); } return this; } /** *

* A list of ulimits to set in the container. If a ulimit value is specified in a task * definition, it overrides the default values set by Docker. This parameter maps to Ulimits in the Create a container section of the * Docker Remote API and the --ulimit option to * docker run. *

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The nofile resource limit * sets a restriction on the number of open files that a container can use. The default nofile soft * limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

*
* * @param ulimits * A list of ulimits to set in the container. If a ulimit value is specified in a * task definition, it overrides the default values set by Docker. This parameter maps to * Ulimits in the Create a container section * of the Docker Remote API and the * --ulimit option to docker run.

*

* Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with * the exception of the nofile resource limit parameter which Fargate overrides. The nofile * resource limit sets a restriction on the number of open files that a container can use. The default * nofile soft limit is 1024 and the default hard limit is 65535. *

*

* This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' *

* *

* This parameter is not supported for Windows containers. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withUlimits(java.util.Collection ulimits) { setUlimits(ulimits); return this; } /** *

* The user to use inside the container. This parameter maps to User in the Create a container section of the Docker * Remote API and the --user option to docker run. *

* *

* When running tasks using the host network mode, don't run containers using the * root user (UID 0). We recommend using a non-root user for better security. *

*
*

* You can specify the user using the following formats. If specifying a UID or GID, you must specify * it as a positive integer. *

*
    *
  • *

    * user *

    *
  • *
  • *

    * user:group *

    *
  • *
  • *

    * uid *

    *
  • *
  • *

    * uid:gid *

    *
  • *
  • *

    * user:gi *

    *
  • *
  • *

    * uid:group *

    *
  • *
  • *

    * *

    *
  • *
* *

* This parameter is not supported for Windows containers. *

*
* * @param user * The user to use inside the container. This parameter maps to User in the Create a container section of the * Docker Remote API and the --user option to docker run.

*

* When running tasks using the host network mode, don't run containers using the * root user (UID 0). We recommend using a non-root user for better security. *

*
*

* You can specify the user using the following formats. If specifying a UID or GID, you must * specify it as a positive integer. *

*
    *
  • *

    * user *

    *
  • *
  • *

    * user:group *

    *
  • *
  • *

    * uid *

    *
  • *
  • *

    * uid:gid *

    *
  • *
  • *

    * user:gi *

    *
  • *
  • *

    * uid:group *

    *
  • *
  • *

    * *

    *
  • *
* *

* This parameter is not supported for Windows containers. *

*/ public void setUser(String user) { this.user = user; } /** *

* The user to use inside the container. This parameter maps to User in the Create a container section of the Docker * Remote API and the --user option to docker run. *

* *

* When running tasks using the host network mode, don't run containers using the * root user (UID 0). We recommend using a non-root user for better security. *

*
*

* You can specify the user using the following formats. If specifying a UID or GID, you must specify * it as a positive integer. *

*
    *
  • *

    * user *

    *
  • *
  • *

    * user:group *

    *
  • *
  • *

    * uid *

    *
  • *
  • *

    * uid:gid *

    *
  • *
  • *

    * user:gi *

    *
  • *
  • *

    * uid:group *

    *
  • *
  • *

    * *

    *
  • *
* *

* This parameter is not supported for Windows containers. *

*
* * @return The user to use inside the container. This parameter maps to User in the Create a container section of * the Docker Remote API and the --user option to docker run.

*

* When running tasks using the host network mode, don't run containers using the * root user (UID 0). We recommend using a non-root user for better security. *

*
*

* You can specify the user using the following formats. If specifying a UID or GID, you must * specify it as a positive integer. *

*
    *
  • *

    * user *

    *
  • *
  • *

    * user:group *

    *
  • *
  • *

    * uid *

    *
  • *
  • *

    * uid:gid *

    *
  • *
  • *

    * user:gi *

    *
  • *
  • *

    * uid:group *

    *
  • *
  • *

    * *

    *
  • *
* *

* This parameter is not supported for Windows containers. *

*/ public String getUser() { return this.user; } /** *

* The user to use inside the container. This parameter maps to User in the Create a container section of the Docker * Remote API and the --user option to docker run. *

* *

* When running tasks using the host network mode, don't run containers using the * root user (UID 0). We recommend using a non-root user for better security. *

*
*

* You can specify the user using the following formats. If specifying a UID or GID, you must specify * it as a positive integer. *

*
    *
  • *

    * user *

    *
  • *
  • *

    * user:group *

    *
  • *
  • *

    * uid *

    *
  • *
  • *

    * uid:gid *

    *
  • *
  • *

    * user:gi *

    *
  • *
  • *

    * uid:group *

    *
  • *
  • *

    * *

    *
  • *
* *

* This parameter is not supported for Windows containers. *

*
* * @param user * The user to use inside the container. This parameter maps to User in the Create a container section of the * Docker Remote API and the --user option to docker run.

*

* When running tasks using the host network mode, don't run containers using the * root user (UID 0). We recommend using a non-root user for better security. *

*
*

* You can specify the user using the following formats. If specifying a UID or GID, you must * specify it as a positive integer. *

*
    *
  • *

    * user *

    *
  • *
  • *

    * user:group *

    *
  • *
  • *

    * uid *

    *
  • *
  • *

    * uid:gid *

    *
  • *
  • *

    * user:gi *

    *
  • *
  • *

    * uid:group *

    *
  • *
  • *

    * *

    *
  • *
* *

* This parameter is not supported for Windows containers. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withUser(String user) { setUser(user); return this; } /** *

* The exit code returned upon completion. *

* * @param exitCode * The exit code returned upon completion. */ public void setExitCode(Integer exitCode) { this.exitCode = exitCode; } /** *

* The exit code returned upon completion. *

* * @return The exit code returned upon completion. */ public Integer getExitCode() { return this.exitCode; } /** *

* The exit code returned upon completion. *

* * @param exitCode * The exit code returned upon completion. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withExitCode(Integer exitCode) { setExitCode(exitCode); return this; } /** *

* A short (255 max characters) human-readable string to provide additional details for a running or stopped * container. *

* * @param reason * A short (255 max characters) human-readable string to provide additional details for a running or stopped * container. */ public void setReason(String reason) { this.reason = reason; } /** *

* A short (255 max characters) human-readable string to provide additional details for a running or stopped * container. *

* * @return A short (255 max characters) human-readable string to provide additional details for a running or stopped * container. */ public String getReason() { return this.reason; } /** *

* A short (255 max characters) human-readable string to provide additional details for a running or stopped * container. *

* * @param reason * A short (255 max characters) human-readable string to provide additional details for a running or stopped * container. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withReason(String reason) { setReason(reason); return this; } /** *

* The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is * /aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING * status. *

* * @param logStreamName * The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch * jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the * RUNNING status. */ public void setLogStreamName(String logStreamName) { this.logStreamName = logStreamName; } /** *

* The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is * /aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING * status. *

* * @return The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch * jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the * RUNNING status. */ public String getLogStreamName() { return this.logStreamName; } /** *

* The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is * /aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING * status. *

* * @param logStreamName * The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch * jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the * RUNNING status. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withLogStreamName(String logStreamName) { setLogStreamName(logStreamName); return this; } /** *

* The network interfaces that are associated with the job. *

* * @return The network interfaces that are associated with the job. */ public java.util.List getNetworkInterfaces() { return networkInterfaces; } /** *

* The network interfaces that are associated with the job. *

* * @param networkInterfaces * The network interfaces that are associated with the job. */ public void setNetworkInterfaces(java.util.Collection networkInterfaces) { if (networkInterfaces == null) { this.networkInterfaces = null; return; } this.networkInterfaces = new java.util.ArrayList(networkInterfaces); } /** *

* The network interfaces that are associated with the job. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setNetworkInterfaces(java.util.Collection)} or {@link #withNetworkInterfaces(java.util.Collection)} if * you want to override the existing values. *

* * @param networkInterfaces * The network interfaces that are associated with the job. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withNetworkInterfaces(NetworkInterface... networkInterfaces) { if (this.networkInterfaces == null) { setNetworkInterfaces(new java.util.ArrayList(networkInterfaces.length)); } for (NetworkInterface ele : networkInterfaces) { this.networkInterfaces.add(ele); } return this; } /** *

* The network interfaces that are associated with the job. *

* * @param networkInterfaces * The network interfaces that are associated with the job. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerDetails withNetworkInterfaces(java.util.Collection networkInterfaces) { setNetworkInterfaces(networkInterfaces); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCommand() != null) sb.append("Command: ").append(getCommand()).append(","); if (getDependsOn() != null) sb.append("DependsOn: ").append(getDependsOn()).append(","); if (getEnvironment() != null) sb.append("Environment: ").append(getEnvironment()).append(","); if (getEssential() != null) sb.append("Essential: ").append(getEssential()).append(","); if (getImage() != null) sb.append("Image: ").append(getImage()).append(","); if (getLinuxParameters() != null) sb.append("LinuxParameters: ").append(getLinuxParameters()).append(","); if (getLogConfiguration() != null) sb.append("LogConfiguration: ").append(getLogConfiguration()).append(","); if (getMountPoints() != null) sb.append("MountPoints: ").append(getMountPoints()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getPrivileged() != null) sb.append("Privileged: ").append(getPrivileged()).append(","); if (getReadonlyRootFilesystem() != null) sb.append("ReadonlyRootFilesystem: ").append(getReadonlyRootFilesystem()).append(","); if (getRepositoryCredentials() != null) sb.append("RepositoryCredentials: ").append(getRepositoryCredentials()).append(","); if (getResourceRequirements() != null) sb.append("ResourceRequirements: ").append(getResourceRequirements()).append(","); if (getSecrets() != null) sb.append("Secrets: ").append(getSecrets()).append(","); if (getUlimits() != null) sb.append("Ulimits: ").append(getUlimits()).append(","); if (getUser() != null) sb.append("User: ").append(getUser()).append(","); if (getExitCode() != null) sb.append("ExitCode: ").append(getExitCode()).append(","); if (getReason() != null) sb.append("Reason: ").append(getReason()).append(","); if (getLogStreamName() != null) sb.append("LogStreamName: ").append(getLogStreamName()).append(","); if (getNetworkInterfaces() != null) sb.append("NetworkInterfaces: ").append(getNetworkInterfaces()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TaskContainerDetails == false) return false; TaskContainerDetails other = (TaskContainerDetails) obj; if (other.getCommand() == null ^ this.getCommand() == null) return false; if (other.getCommand() != null && other.getCommand().equals(this.getCommand()) == false) return false; if (other.getDependsOn() == null ^ this.getDependsOn() == null) return false; if (other.getDependsOn() != null && other.getDependsOn().equals(this.getDependsOn()) == false) return false; if (other.getEnvironment() == null ^ this.getEnvironment() == null) return false; if (other.getEnvironment() != null && other.getEnvironment().equals(this.getEnvironment()) == false) return false; if (other.getEssential() == null ^ this.getEssential() == null) return false; if (other.getEssential() != null && other.getEssential().equals(this.getEssential()) == false) return false; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getLinuxParameters() == null ^ this.getLinuxParameters() == null) return false; if (other.getLinuxParameters() != null && other.getLinuxParameters().equals(this.getLinuxParameters()) == false) return false; if (other.getLogConfiguration() == null ^ this.getLogConfiguration() == null) return false; if (other.getLogConfiguration() != null && other.getLogConfiguration().equals(this.getLogConfiguration()) == false) return false; if (other.getMountPoints() == null ^ this.getMountPoints() == null) return false; if (other.getMountPoints() != null && other.getMountPoints().equals(this.getMountPoints()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getPrivileged() == null ^ this.getPrivileged() == null) return false; if (other.getPrivileged() != null && other.getPrivileged().equals(this.getPrivileged()) == false) return false; if (other.getReadonlyRootFilesystem() == null ^ this.getReadonlyRootFilesystem() == null) return false; if (other.getReadonlyRootFilesystem() != null && other.getReadonlyRootFilesystem().equals(this.getReadonlyRootFilesystem()) == false) return false; if (other.getRepositoryCredentials() == null ^ this.getRepositoryCredentials() == null) return false; if (other.getRepositoryCredentials() != null && other.getRepositoryCredentials().equals(this.getRepositoryCredentials()) == false) return false; if (other.getResourceRequirements() == null ^ this.getResourceRequirements() == null) return false; if (other.getResourceRequirements() != null && other.getResourceRequirements().equals(this.getResourceRequirements()) == false) return false; if (other.getSecrets() == null ^ this.getSecrets() == null) return false; if (other.getSecrets() != null && other.getSecrets().equals(this.getSecrets()) == false) return false; if (other.getUlimits() == null ^ this.getUlimits() == null) return false; if (other.getUlimits() != null && other.getUlimits().equals(this.getUlimits()) == false) return false; if (other.getUser() == null ^ this.getUser() == null) return false; if (other.getUser() != null && other.getUser().equals(this.getUser()) == false) return false; if (other.getExitCode() == null ^ this.getExitCode() == null) return false; if (other.getExitCode() != null && other.getExitCode().equals(this.getExitCode()) == false) return false; if (other.getReason() == null ^ this.getReason() == null) return false; if (other.getReason() != null && other.getReason().equals(this.getReason()) == false) return false; if (other.getLogStreamName() == null ^ this.getLogStreamName() == null) return false; if (other.getLogStreamName() != null && other.getLogStreamName().equals(this.getLogStreamName()) == false) return false; if (other.getNetworkInterfaces() == null ^ this.getNetworkInterfaces() == null) return false; if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals(this.getNetworkInterfaces()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getDependsOn() == null) ? 0 : getDependsOn().hashCode()); hashCode = prime * hashCode + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode()); hashCode = prime * hashCode + ((getEssential() == null) ? 0 : getEssential().hashCode()); hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getLinuxParameters() == null) ? 0 : getLinuxParameters().hashCode()); hashCode = prime * hashCode + ((getLogConfiguration() == null) ? 0 : getLogConfiguration().hashCode()); hashCode = prime * hashCode + ((getMountPoints() == null) ? 0 : getMountPoints().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getPrivileged() == null) ? 0 : getPrivileged().hashCode()); hashCode = prime * hashCode + ((getReadonlyRootFilesystem() == null) ? 0 : getReadonlyRootFilesystem().hashCode()); hashCode = prime * hashCode + ((getRepositoryCredentials() == null) ? 0 : getRepositoryCredentials().hashCode()); hashCode = prime * hashCode + ((getResourceRequirements() == null) ? 0 : getResourceRequirements().hashCode()); hashCode = prime * hashCode + ((getSecrets() == null) ? 0 : getSecrets().hashCode()); hashCode = prime * hashCode + ((getUlimits() == null) ? 0 : getUlimits().hashCode()); hashCode = prime * hashCode + ((getUser() == null) ? 0 : getUser().hashCode()); hashCode = prime * hashCode + ((getExitCode() == null) ? 0 : getExitCode().hashCode()); hashCode = prime * hashCode + ((getReason() == null) ? 0 : getReason().hashCode()); hashCode = prime * hashCode + ((getLogStreamName() == null) ? 0 : getLogStreamName().hashCode()); hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); return hashCode; } @Override public TaskContainerDetails clone() { try { return (TaskContainerDetails) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.batch.model.transform.TaskContainerDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }