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

com.amazonaws.services.batch.model.TaskContainerProperties 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;

/**
 * 

* Container properties are used for Amazon ECS-based job definitions. These properties to describe the container that's * launched as part of a job. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TaskContainerProperties 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 Dockerfile reference: 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 inthe Create a container section of the Docker Remote API and the --env parameter to docker run. *

* *

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for variables * that Batch sets. *

*
*/ 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 * . *

*/ 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. The name can be used as a unique identifier to target your dependsOn and * Overrides objects. *

*/ 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 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 Dockerfile reference: 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 Dockerfile reference: * 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 Dockerfile reference: 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 Dockerfile reference: 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 Dockerfile reference: 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 Dockerfile reference: CMD. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerProperties 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 Dockerfile reference: 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 Dockerfile reference: CMD. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties withDependsOn(java.util.Collection dependsOn) { setDependsOn(dependsOn); return this; } /** *

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

* *

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for variables * that Batch sets. *

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

*

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for * variables that Batch sets. *

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

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

* *

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for variables * that Batch sets. *

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

*

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for * variables that Batch sets. *

*/ 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 inthe Create a container section of the Docker Remote API and the --env parameter to docker run. *

* *

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for variables * that Batch sets. *

*
*

* 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 inthe Create a container section of the * Docker Remote API and the --env * parameter to docker run.

*

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for * variables that Batch sets. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerProperties 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 inthe Create a container section of the Docker Remote API and the --env parameter to docker run. *

* *

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for variables * that Batch sets. *

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

*

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

*
*

* Environment variables cannot start with AWS_BATCH. This naming convention is reserved for * variables that Batch sets. *

* @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 * . *

* * @param linuxParameters * Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For * more information, see KernelCapabilities. */ 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 * . *

* * @return Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For * more information, see KernelCapabilities. */ 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 * . *

* * @param linuxParameters * Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For * more information, see KernelCapabilities. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties withMountPoints(java.util.Collection mountPoints) { setMountPoints(mountPoints); return this; } /** *

* The name of a container. The name can be used as a unique identifier to target your dependsOn and * Overrides objects. *

* * @param name * The name of a container. The name can be used as a unique identifier to target your dependsOn * and Overrides objects. */ public void setName(String name) { this.name = name; } /** *

* The name of a container. The name can be used as a unique identifier to target your dependsOn and * Overrides objects. *

* * @return The name of a container. The name can be used as a unique identifier to target your * dependsOn and Overrides objects. */ public String getName() { return this.name; } /** *

* The name of a container. The name can be used as a unique identifier to target your dependsOn and * Overrides objects. *

* * @param name * The name of a container. The name can be used as a unique identifier to target your dependsOn * and Overrides objects. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties 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 TaskContainerProperties withUser(String user) { setUser(user); 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()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TaskContainerProperties == false) return false; TaskContainerProperties other = (TaskContainerProperties) 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; 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()); return hashCode; } @Override public TaskContainerProperties clone() { try { return (TaskContainerProperties) 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.TaskContainerPropertiesMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy