/* * Copyright 2018-2023 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 ContainerProperties implements Serializable, Cloneable, StructuredPojo { /** *
* The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker
* Hub registry are available by default. Other repositories are specified with
* repository-url/image:tag
. It can be 255 characters long. It can contain
* uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.), forward slashes
* (/), and number signs (#). This parameter maps to Image
in the Create a container section of the Docker Remote API and the IMAGE
parameter of docker run.
*
* Docker image architecture must match the processor architecture of the compute resources that they're scheduled * on. For example, ARM-based Docker images can only run on ARM-based compute resources. *
*
* Images in Amazon ECR Public repositories use the full registry/repository[:tag]
or
* registry/repository[@digest]
naming conventions. For example,
* public.ecr.aws/registry_alias/my-web-app:latest
.
*
* Images in Amazon ECR repositories use the full registry and repository URI (for example,
* 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name>
).
*
* Images in official repositories on Docker Hub use a single name (for example, ubuntu
or
* mongo
).
*
* Images in other repositories on Docker Hub are qualified with an organization name (for example,
* amazon/amazon-ecs-agent
).
*
* Images in other online repositories are qualified further by a domain name (for example,
* quay.io/assemblyline/ubuntu
).
*
* This parameter is deprecated, use resourceRequirements
to specify the vCPU requirements for the job
* definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it
* specifies the number of vCPUs reserved for the job.
*
* Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the Docker Remote API and the --cpu-shares
option
* to docker run. The number of vCPUs must be specified
* but can be specified in several places. You must specify it at least once for each node.
*
* This parameter is deprecated, use resourceRequirements
to specify the memory requirements for the
* job definition. It's not supported for jobs running on Fargate resources. For jobs that run on EC2 resources, it
* specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified
* number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory
* hard limit can be specified in several places. It must be specified for each node at least once.
*
* 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.
*
* The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services permissions. * For more information, see IAM roles for tasks in * the Amazon Elastic Container Service Developer Guide. *
*/ private String jobRoleArn; /** ** The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate * resources, you must provide an execution role. For more information, see Batch execution IAM role in * the Batch User Guide. *
*/ private String executionRoleArn; /** ** A list of data volumes used in a job. *
*/ private java.util.List
* 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. *
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
* 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.
*
* 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
.
*
* When this parameter is true, the container is given elevated permissions 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. The default value is false.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or * specified as false. *
*
* A list of ulimits
to set in the container. This parameter maps to Ulimits
in the Create a container section of the Docker Remote API and the --ulimit
option to docker run.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
*
* The user name 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.
*
* The instance type to use for a multi-node parallel job. All node groups in a multi-node parallel job must use the * same instance type. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
*
* The type and amount of resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
* Linux-specific modifications that are applied to the container, such as details for device mappings. *
*/ 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 might 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 on the options for different supported log
* drivers, see Configure logging drivers in
* the Docker documentation.
*
* Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). *
*
* 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 | grep "Server API version"
*
* 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.
*
* The secrets for the container. For more information, see Specifying sensitive * data in the Batch User Guide. *
*/ private java.util.List* The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources * must not specify this parameter. *
*/ private NetworkConfiguration networkConfiguration; /** ** The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources * must not specify this parameter. *
*/ private FargatePlatformConfiguration fargatePlatformConfiguration; /** ** The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of * ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. *
*/ private EphemeralStorage ephemeralStorage; private RuntimePlatform runtimePlatform; /** *
* The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker
* Hub registry are available by default. Other repositories are specified with
* repository-url/image:tag
. It can be 255 characters long. It can contain
* uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.), forward slashes
* (/), and number signs (#). This parameter maps to Image
in the Create a container section of the Docker Remote API and the IMAGE
parameter of docker run.
*
* Docker image architecture must match the processor architecture of the compute resources that they're scheduled * on. For example, ARM-based Docker images can only run on ARM-based compute resources. *
*
* Images in Amazon ECR Public repositories use the full registry/repository[:tag]
or
* registry/repository[@digest]
naming conventions. For example,
* public.ecr.aws/registry_alias/my-web-app:latest
.
*
* Images in Amazon ECR repositories use the full registry and repository URI (for example,
* 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name>
).
*
* Images in official repositories on Docker Hub use a single name (for example, ubuntu
or
* mongo
).
*
* Images in other repositories on Docker Hub are qualified with an organization name (for example,
* amazon/amazon-ecs-agent
).
*
* Images in other online repositories are qualified further by a domain name (for example,
* quay.io/assemblyline/ubuntu
).
*
repository-url/image:tag
. It can be 255 characters long. It can
* contain uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.),
* forward slashes (/), and number signs (#). This parameter maps to Image
in the Create a container section of the
* Docker Remote API and the IMAGE
* parameter of docker run. * Docker image architecture must match the processor architecture of the compute resources that they're * scheduled on. For example, ARM-based Docker images can only run on ARM-based compute resources. *
*
* Images in Amazon ECR Public repositories use the full registry/repository[:tag]
or
* registry/repository[@digest]
naming conventions. For example,
* public.ecr.aws/registry_alias/my-web-app:latest
.
*
* Images in Amazon ECR repositories use the full registry and repository URI (for example,
* 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name>
).
*
* Images in official repositories on Docker Hub use a single name (for example, ubuntu
or
* mongo
).
*
* Images in other repositories on Docker Hub are qualified with an organization name (for example,
* amazon/amazon-ecs-agent
).
*
* Images in other online repositories are qualified further by a domain name (for example,
* quay.io/assemblyline/ubuntu
).
*
* The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker
* Hub registry are available by default. Other repositories are specified with
* repository-url/image:tag
. It can be 255 characters long. It can contain
* uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.), forward slashes
* (/), and number signs (#). This parameter maps to Image
in the Create a container section of the Docker Remote API and the IMAGE
parameter of docker run.
*
* Docker image architecture must match the processor architecture of the compute resources that they're scheduled * on. For example, ARM-based Docker images can only run on ARM-based compute resources. *
*
* Images in Amazon ECR Public repositories use the full registry/repository[:tag]
or
* registry/repository[@digest]
naming conventions. For example,
* public.ecr.aws/registry_alias/my-web-app:latest
.
*
* Images in Amazon ECR repositories use the full registry and repository URI (for example,
* 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name>
).
*
* Images in official repositories on Docker Hub use a single name (for example, ubuntu
or
* mongo
).
*
* Images in other repositories on Docker Hub are qualified with an organization name (for example,
* amazon/amazon-ecs-agent
).
*
* Images in other online repositories are qualified further by a domain name (for example,
* quay.io/assemblyline/ubuntu
).
*
repository-url/image:tag
. It can be 255 characters long. It can
* contain uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.),
* forward slashes (/), and number signs (#). This parameter maps to Image
in the Create a container section of the
* Docker Remote API and the IMAGE
* parameter of docker run. * Docker image architecture must match the processor architecture of the compute resources that they're * scheduled on. For example, ARM-based Docker images can only run on ARM-based compute resources. *
*
* Images in Amazon ECR Public repositories use the full registry/repository[:tag]
or
* registry/repository[@digest]
naming conventions. For example,
* public.ecr.aws/registry_alias/my-web-app:latest
.
*
* Images in Amazon ECR repositories use the full registry and repository URI (for example,
* 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name>
).
*
* Images in official repositories on Docker Hub use a single name (for example, ubuntu
or
* mongo
).
*
* Images in other repositories on Docker Hub are qualified with an organization name (for example,
* amazon/amazon-ecs-agent
).
*
* Images in other online repositories are qualified further by a domain name (for example,
* quay.io/assemblyline/ubuntu
).
*
* The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker
* Hub registry are available by default. Other repositories are specified with
* repository-url/image:tag
. It can be 255 characters long. It can contain
* uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.), forward slashes
* (/), and number signs (#). This parameter maps to Image
in the Create a container section of the Docker Remote API and the IMAGE
parameter of docker run.
*
* Docker image architecture must match the processor architecture of the compute resources that they're scheduled * on. For example, ARM-based Docker images can only run on ARM-based compute resources. *
*
* Images in Amazon ECR Public repositories use the full registry/repository[:tag]
or
* registry/repository[@digest]
naming conventions. For example,
* public.ecr.aws/registry_alias/my-web-app:latest
.
*
* Images in Amazon ECR repositories use the full registry and repository URI (for example,
* 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name>
).
*
* Images in official repositories on Docker Hub use a single name (for example, ubuntu
or
* mongo
).
*
* Images in other repositories on Docker Hub are qualified with an organization name (for example,
* amazon/amazon-ecs-agent
).
*
* Images in other online repositories are qualified further by a domain name (for example,
* quay.io/assemblyline/ubuntu
).
*
repository-url/image:tag
. It can be 255 characters long. It can
* contain uppercase and lowercase letters, numbers, hyphens (-), underscores (_), colons (:), periods (.),
* forward slashes (/), and number signs (#). This parameter maps to Image
in the Create a container section of the
* Docker Remote API and the IMAGE
* parameter of docker run. * Docker image architecture must match the processor architecture of the compute resources that they're * scheduled on. For example, ARM-based Docker images can only run on ARM-based compute resources. *
*
* Images in Amazon ECR Public repositories use the full registry/repository[:tag]
or
* registry/repository[@digest]
naming conventions. For example,
* public.ecr.aws/registry_alias/my-web-app:latest
.
*
* Images in Amazon ECR repositories use the full registry and repository URI (for example,
* 123456789012.dkr.ecr.<region-name>.amazonaws.com/<repository-name>
).
*
* Images in official repositories on Docker Hub use a single name (for example, ubuntu
or
* mongo
).
*
* Images in other repositories on Docker Hub are qualified with an organization name (for example,
* amazon/amazon-ecs-agent
).
*
* Images in other online repositories are qualified further by a domain name (for example,
* quay.io/assemblyline/ubuntu
).
*
* This parameter is deprecated, use resourceRequirements
to specify the vCPU requirements for the job
* definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it
* specifies the number of vCPUs reserved for the job.
*
* Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the Docker Remote API and the --cpu-shares
option
* to docker run. The number of vCPUs must be specified
* but can be specified in several places. You must specify it at least once for each node.
*
resourceRequirements
to specify the vCPU requirements for
* the job definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2
* resources, it specifies the number of vCPUs reserved for the job.
*
* Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the
* Docker Remote API and the
* --cpu-shares
option to docker
* run. The number of vCPUs must be specified but can be specified in several places. You must specify it
* at least once for each node.
*/
@Deprecated
public void setVcpus(Integer vcpus) {
this.vcpus = vcpus;
}
/**
*
* This parameter is deprecated, use resourceRequirements
to specify the vCPU requirements for the job
* definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it
* specifies the number of vCPUs reserved for the job.
*
* Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the Docker Remote API and the --cpu-shares
option
* to docker run. The number of vCPUs must be specified
* but can be specified in several places. You must specify it at least once for each node.
*
resourceRequirements
to specify the vCPU requirements for
* the job definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2
* resources, it specifies the number of vCPUs reserved for the job.
*
* Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the
* Docker Remote API and the
* --cpu-shares
option to docker
* run. The number of vCPUs must be specified but can be specified in several places. You must specify
* it at least once for each node.
*/
@Deprecated
public Integer getVcpus() {
return this.vcpus;
}
/**
*
* This parameter is deprecated, use resourceRequirements
to specify the vCPU requirements for the job
* definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2 resources, it
* specifies the number of vCPUs reserved for the job.
*
* Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the Docker Remote API and the --cpu-shares
option
* to docker run. The number of vCPUs must be specified
* but can be specified in several places. You must specify it at least once for each node.
*
resourceRequirements
to specify the vCPU requirements for
* the job definition. It's not supported for jobs running on Fargate resources. For jobs running on EC2
* resources, it specifies the number of vCPUs reserved for the job.
*
* Each vCPU is equivalent to 1,024 CPU shares. This parameter maps to CpuShares
in the Create a container section of the
* Docker Remote API and the
* --cpu-shares
option to docker
* run. The number of vCPUs must be specified but can be specified in several places. You must specify it
* at least once for each node.
* @return Returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public ContainerProperties withVcpus(Integer vcpus) {
setVcpus(vcpus);
return this;
}
/**
*
* This parameter is deprecated, use resourceRequirements
to specify the memory requirements for the
* job definition. It's not supported for jobs running on Fargate resources. For jobs that run on EC2 resources, it
* specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified
* number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory
* hard limit can be specified in several places. It must be specified for each node at least once.
*
resourceRequirements
to specify the memory requirements for
* the job definition. It's not supported for jobs running on Fargate resources. For jobs that run on EC2
* resources, it specifies the memory hard limit (in MiB) for a container. If your container attempts to
* exceed the specified number, it's terminated. You must specify at least 4 MiB of memory for a job using
* this parameter. The memory hard limit can be specified in several places. It must be specified for each
* node at least once.
*/
@Deprecated
public void setMemory(Integer memory) {
this.memory = memory;
}
/**
*
* This parameter is deprecated, use resourceRequirements
to specify the memory requirements for the
* job definition. It's not supported for jobs running on Fargate resources. For jobs that run on EC2 resources, it
* specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified
* number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory
* hard limit can be specified in several places. It must be specified for each node at least once.
*
resourceRequirements
to specify the memory requirements
* for the job definition. It's not supported for jobs running on Fargate resources. For jobs that run on
* EC2 resources, it specifies the memory hard limit (in MiB) for a container. If your container attempts to
* exceed the specified number, it's terminated. You must specify at least 4 MiB of memory for a job using
* this parameter. The memory hard limit can be specified in several places. It must be specified for each
* node at least once.
*/
@Deprecated
public Integer getMemory() {
return this.memory;
}
/**
*
* This parameter is deprecated, use resourceRequirements
to specify the memory requirements for the
* job definition. It's not supported for jobs running on Fargate resources. For jobs that run on EC2 resources, it
* specifies the memory hard limit (in MiB) for a container. If your container attempts to exceed the specified
* number, it's terminated. You must specify at least 4 MiB of memory for a job using this parameter. The memory
* hard limit can be specified in several places. It must be specified for each node at least once.
*
resourceRequirements
to specify the memory requirements for
* the job definition. It's not supported for jobs running on Fargate resources. For jobs that run on EC2
* resources, it specifies the memory hard limit (in MiB) for a container. If your container attempts to
* exceed the specified number, it's terminated. You must specify at least 4 MiB of memory for a job using
* this parameter. The memory hard limit can be specified in several places. It must be specified for each
* node at least once.
* @return Returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public ContainerProperties withMemory(Integer memory) {
setMemory(memory);
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.
*
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
* 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.
*
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
* 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 toCmd
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 ContainerProperties withCommand(String... command) {
if (this.command == null) {
setCommand(new java.util.ArrayList
* 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.
*
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 ContainerProperties withCommand(java.util.Collection* The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services permissions. * For more information, see IAM roles for tasks in * the Amazon Elastic Container Service Developer Guide. *
* * @param jobRoleArn * The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services * permissions. For more information, see IAM roles for * tasks in the Amazon Elastic Container Service Developer Guide. */ public void setJobRoleArn(String jobRoleArn) { this.jobRoleArn = jobRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services permissions. * For more information, see IAM roles for tasks in * the Amazon Elastic Container Service Developer Guide. *
* * @return The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services * permissions. For more information, see IAM roles for * tasks in the Amazon Elastic Container Service Developer Guide. */ public String getJobRoleArn() { return this.jobRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services permissions. * For more information, see IAM roles for tasks in * the Amazon Elastic Container Service Developer Guide. *
* * @param jobRoleArn * The Amazon Resource Name (ARN) of the IAM role that the container can assume for Amazon Web Services * permissions. For more information, see IAM roles for * tasks in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withJobRoleArn(String jobRoleArn) { setJobRoleArn(jobRoleArn); return this; } /** ** The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate * resources, you must provide an execution role. For more information, see Batch execution IAM role in * the Batch User Guide. *
* * @param executionRoleArn * The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate * resources, you must provide an execution role. For more information, see Batch execution IAM * role in the Batch User Guide. */ public void setExecutionRoleArn(String executionRoleArn) { this.executionRoleArn = executionRoleArn; } /** ** The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate * resources, you must provide an execution role. For more information, see Batch execution IAM role in * the Batch User Guide. *
* * @return The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate * resources, you must provide an execution role. For more information, see Batch execution IAM * role in the Batch User Guide. */ public String getExecutionRoleArn() { return this.executionRoleArn; } /** ** The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate * resources, you must provide an execution role. For more information, see Batch execution IAM role in * the Batch User Guide. *
* * @param executionRoleArn * The Amazon Resource Name (ARN) of the execution role that Batch can assume. For jobs that run on Fargate * resources, you must provide an execution role. For more information, see Batch execution IAM * role in the Batch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withExecutionRoleArn(String executionRoleArn) { setExecutionRoleArn(executionRoleArn); return this; } /** ** A list of data volumes used in a job. *
* * @return A list of data volumes used in a job. */ public java.util.List* A list of data volumes used in a job. *
* * @param volumes * A list of data volumes used in a job. */ public void setVolumes(java.util.Collection* A list of data volumes used in a job. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setVolumes(java.util.Collection)} or {@link #withVolumes(java.util.Collection)} if you want to override * the existing values. *
* * @param volumes * A list of data volumes used in a job. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withVolumes(Volume... volumes) { if (this.volumes == null) { setVolumes(new java.util.ArrayList* A list of data volumes used in a job. *
* * @param volumes * A list of data volumes used in a job. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withVolumes(java.util.Collection
* 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. *
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
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. *
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
* 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. *
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
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. *
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
* 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. *
*
* 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 toEnv
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. *
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
* 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. *
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
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. *
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
* 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.
*
Volumes
in the
* Create a container section of
* the Docker Remote API and the
* --volume
option to docker run.
*/
public java.util.List
* 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.
*
Volumes
in the Create a container section of the
* Docker Remote API and the --volume
* option to docker run.
*/
public void setMountPoints(java.util.Collection
* 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.
*
* 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 toVolumes
in the Create a container section of the
* Docker Remote API and the --volume
* option to docker run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerProperties withMountPoints(MountPoint... mountPoints) {
if (this.mountPoints == null) {
setMountPoints(new java.util.ArrayList
* 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.
*
Volumes
in the Create a container section of the
* Docker Remote API and the --volume
* option to docker run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerProperties withMountPoints(java.util.Collection
* 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
.
*
ReadonlyRootfs
in the Create a container section of the
* Docker Remote API and the --read-only
* option to docker run
.
*/
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
.
*
ReadonlyRootfs
in the Create a container section of the
* Docker Remote API and the
* --read-only
option to docker run
.
*/
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
.
*
ReadonlyRootfs
in the Create a container section of the
* Docker Remote API and the --read-only
* option to docker run
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerProperties 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
.
*
ReadonlyRootfs
in the Create a container section of the
* Docker Remote API and the
* --read-only
option to docker run
.
*/
public Boolean isReadonlyRootFilesystem() {
return this.readonlyRootFilesystem;
}
/**
*
* When this parameter is true, the container is given elevated permissions 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. The default value is false.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or * specified as false. *
*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. The default value is false. * This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, * or specified as false. *
*/ public void setPrivileged(Boolean privileged) { this.privileged = privileged; } /** *
* When this parameter is true, the container is given elevated permissions 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. The default value is false.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or * specified as false. *
*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. The default value is false. * This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, * or specified as false. *
*/ public Boolean getPrivileged() { return this.privileged; } /** *
* When this parameter is true, the container is given elevated permissions 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. The default value is false.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or * specified as false. *
*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. The default value is false. * This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, * or specified as false. *
* @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withPrivileged(Boolean privileged) { setPrivileged(privileged); return this; } /** *
* When this parameter is true, the container is given elevated permissions 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. The default value is false.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, or * specified as false. *
*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. The default value is false. * This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided, * or specified as false. *
*/ public Boolean isPrivileged() { return this.privileged; } /** *
* A list of ulimits
to set in the container. This parameter maps to Ulimits
in the Create a container section of the Docker Remote API and the --ulimit
option to docker run.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
*ulimits
to set in the container. This parameter maps to Ulimits
in
* the Create a container section
* of the Docker Remote API and the
* --ulimit
option to docker
* run. * This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
*/ public java.util.List
* A list of ulimits
to set in the container. This parameter maps to Ulimits
in the Create a container section of the Docker Remote API and the --ulimit
option to docker run.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
*ulimits
to set in the container. This parameter maps to Ulimits
in the
* Create a container section of
* the Docker Remote API and the
* --ulimit
option to docker
* run. * This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
*/ public void setUlimits(java.util.Collection
* A list of ulimits
to set in the container. This parameter maps to Ulimits
in the Create a container section of the Docker Remote API and the --ulimit
option to docker run.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
** 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 ofulimits
to set in the container. This parameter maps to Ulimits
in the
* Create a container section of
* the Docker Remote API and the
* --ulimit
option to docker
* run. * This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
* @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withUlimits(Ulimit... ulimits) { if (this.ulimits == null) { setUlimits(new java.util.ArrayList
* A list of ulimits
to set in the container. This parameter maps to Ulimits
in the Create a container section of the Docker Remote API and the --ulimit
option to docker run.
*
* This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
*ulimits
to set in the container. This parameter maps to Ulimits
in the
* Create a container section of
* the Docker Remote API and the
* --ulimit
option to docker
* run. * This parameter isn't applicable to jobs that are running on Fargate resources and shouldn't be provided. *
* @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withUlimits(java.util.Collection
* The user name 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.
*
User
in the Create a container section of the
* Docker Remote API and the --user
* option to docker run.
*/
public void setUser(String user) {
this.user = user;
}
/**
*
* The user name 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.
*
User
in the Create a container section of the
* Docker Remote API and the --user
* option to docker run.
*/
public String getUser() {
return this.user;
}
/**
*
* The user name 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.
*
User
in the Create a container section of the
* Docker Remote API and the --user
* option to docker run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerProperties withUser(String user) {
setUser(user);
return this;
}
/**
* * The instance type to use for a multi-node parallel job. All node groups in a multi-node parallel job must use the * same instance type. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
*/ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The instance type to use for a multi-node parallel job. All node groups in a multi-node parallel job must use the * same instance type. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
*/ public String getInstanceType() { return this.instanceType; } /** ** The instance type to use for a multi-node parallel job. All node groups in a multi-node parallel job must use the * same instance type. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
* @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *
* The type and amount of resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
GPU
, MEMORY
, and VCPU
.
*/
public java.util.List
* The type and amount of resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
GPU
, MEMORY
, and VCPU
.
*/
public void setResourceRequirements(java.util.Collection
* The type and amount of resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
* 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 resources to assign to a container. The supported resources include *GPU
, MEMORY
, and VCPU
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerProperties withResourceRequirements(ResourceRequirement... resourceRequirements) {
if (this.resourceRequirements == null) {
setResourceRequirements(new java.util.ArrayList
* The type and amount of resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
GPU
, MEMORY
, and VCPU
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerProperties withResourceRequirements(java.util.Collection* Linux-specific modifications that are applied to the container, such as details for device mappings. *
* * @param linuxParameters * Linux-specific modifications that are applied to the container, such as details for device mappings. */ public void setLinuxParameters(LinuxParameters linuxParameters) { this.linuxParameters = linuxParameters; } /** ** Linux-specific modifications that are applied to the container, such as details for device mappings. *
* * @return Linux-specific modifications that are applied to the container, such as details for device mappings. */ public LinuxParameters getLinuxParameters() { return this.linuxParameters; } /** ** Linux-specific modifications that are applied to the container, such as details for device mappings. *
* * @param linuxParameters * Linux-specific modifications that are applied to the container, such as details for device mappings. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties 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 might 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 on the options for different supported log
* drivers, see Configure logging drivers in
* the Docker documentation.
*
* Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). *
*
* 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 | grep "Server API version"
*
* 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.
*
* 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 might 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 on the options for different supported log drivers, see Configure logging drivers in the Docker
* documentation.
*
* Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). *
*
* 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 | grep "Server API version"
*
* 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.
*
* 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 might 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 on the options for different supported log
* drivers, see Configure logging drivers in
* the Docker documentation.
*
* Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). *
*
* 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 | grep "Server API version"
*
* 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.
*
* 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 might 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 on the options for different supported log drivers, see Configure logging drivers in the Docker
* documentation.
*
* Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). *
*
* 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 | grep "Server API version"
*
* 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.
*
* 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 might 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 on the options for different supported log
* drivers, see Configure logging drivers in
* the Docker documentation.
*
* Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). *
*
* 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 | grep "Server API version"
*
* 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.
*
* 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 might 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 on the options for different supported log drivers, see Configure logging drivers in the Docker
* documentation.
*
* Batch currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). *
*
* 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 | grep "Server API version"
*
* 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.
*
* The secrets for the container. For more information, see Specifying sensitive * data in the Batch User Guide. *
* * @return The secrets for the container. For more information, see Specifying * sensitive data in the Batch User Guide. */ public java.util.List* The secrets for the container. For more information, see Specifying sensitive * data in the Batch User Guide. *
* * @param secrets * The secrets for the container. For more information, see Specifying * sensitive data in the Batch User Guide. */ public void setSecrets(java.util.Collection* The secrets for the container. For more information, see Specifying sensitive * data in the Batch User 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 for the container. For more information, see Specifying * sensitive data in the Batch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withSecrets(Secret... secrets) { if (this.secrets == null) { setSecrets(new java.util.ArrayList* The secrets for the container. For more information, see Specifying sensitive * data in the Batch User Guide. *
* * @param secrets * The secrets for the container. For more information, see Specifying * sensitive data in the Batch User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withSecrets(java.util.Collection* The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources * must not specify this parameter. *
* * @param networkConfiguration * The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 * resources must not specify this parameter. */ public void setNetworkConfiguration(NetworkConfiguration networkConfiguration) { this.networkConfiguration = networkConfiguration; } /** ** The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources * must not specify this parameter. *
* * @return The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 * resources must not specify this parameter. */ public NetworkConfiguration getNetworkConfiguration() { return this.networkConfiguration; } /** ** The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources * must not specify this parameter. *
* * @param networkConfiguration * The network configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 * resources must not specify this parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withNetworkConfiguration(NetworkConfiguration networkConfiguration) { setNetworkConfiguration(networkConfiguration); return this; } /** ** The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources * must not specify this parameter. *
* * @param fargatePlatformConfiguration * The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 * resources must not specify this parameter. */ public void setFargatePlatformConfiguration(FargatePlatformConfiguration fargatePlatformConfiguration) { this.fargatePlatformConfiguration = fargatePlatformConfiguration; } /** ** The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources * must not specify this parameter. *
* * @return The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 * resources must not specify this parameter. */ public FargatePlatformConfiguration getFargatePlatformConfiguration() { return this.fargatePlatformConfiguration; } /** ** The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 resources * must not specify this parameter. *
* * @param fargatePlatformConfiguration * The platform configuration for jobs that are running on Fargate resources. Jobs that are running on EC2 * resources must not specify this parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withFargatePlatformConfiguration(FargatePlatformConfiguration fargatePlatformConfiguration) { setFargatePlatformConfiguration(fargatePlatformConfiguration); return this; } /** ** The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of * ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. *
* * @param ephemeralStorage * The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total * amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. */ public void setEphemeralStorage(EphemeralStorage ephemeralStorage) { this.ephemeralStorage = ephemeralStorage; } /** ** The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of * ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. *
* * @return The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total * amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. */ public EphemeralStorage getEphemeralStorage() { return this.ephemeralStorage; } /** ** The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of * ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. *
* * @param ephemeralStorage * The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total * amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withEphemeralStorage(EphemeralStorage ephemeralStorage) { setEphemeralStorage(ephemeralStorage); return this; } /** * @param runtimePlatform */ public void setRuntimePlatform(RuntimePlatform runtimePlatform) { this.runtimePlatform = runtimePlatform; } /** * @return */ public RuntimePlatform getRuntimePlatform() { return this.runtimePlatform; } /** * @param runtimePlatform * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerProperties withRuntimePlatform(RuntimePlatform runtimePlatform) { setRuntimePlatform(runtimePlatform); 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 (getImage() != null) sb.append("Image: ").append(getImage()).append(","); if (getVcpus() != null) sb.append("Vcpus: ").append(getVcpus()).append(","); if (getMemory() != null) sb.append("Memory: ").append(getMemory()).append(","); if (getCommand() != null) sb.append("Command: ").append(getCommand()).append(","); if (getJobRoleArn() != null) sb.append("JobRoleArn: ").append(getJobRoleArn()).append(","); if (getExecutionRoleArn() != null) sb.append("ExecutionRoleArn: ").append(getExecutionRoleArn()).append(","); if (getVolumes() != null) sb.append("Volumes: ").append(getVolumes()).append(","); if (getEnvironment() != null) sb.append("Environment: ").append(getEnvironment()).append(","); if (getMountPoints() != null) sb.append("MountPoints: ").append(getMountPoints()).append(","); if (getReadonlyRootFilesystem() != null) sb.append("ReadonlyRootFilesystem: ").append(getReadonlyRootFilesystem()).append(","); if (getPrivileged() != null) sb.append("Privileged: ").append(getPrivileged()).append(","); if (getUlimits() != null) sb.append("Ulimits: ").append(getUlimits()).append(","); if (getUser() != null) sb.append("User: ").append(getUser()).append(","); if (getInstanceType() != null) sb.append("InstanceType: ").append(getInstanceType()).append(","); if (getResourceRequirements() != null) sb.append("ResourceRequirements: ").append(getResourceRequirements()).append(","); if (getLinuxParameters() != null) sb.append("LinuxParameters: ").append(getLinuxParameters()).append(","); if (getLogConfiguration() != null) sb.append("LogConfiguration: ").append(getLogConfiguration()).append(","); if (getSecrets() != null) sb.append("Secrets: ").append(getSecrets()).append(","); if (getNetworkConfiguration() != null) sb.append("NetworkConfiguration: ").append(getNetworkConfiguration()).append(","); if (getFargatePlatformConfiguration() != null) sb.append("FargatePlatformConfiguration: ").append(getFargatePlatformConfiguration()).append(","); if (getEphemeralStorage() != null) sb.append("EphemeralStorage: ").append(getEphemeralStorage()).append(","); if (getRuntimePlatform() != null) sb.append("RuntimePlatform: ").append(getRuntimePlatform()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ContainerProperties == false) return false; ContainerProperties other = (ContainerProperties) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getVcpus() == null ^ this.getVcpus() == null) return false; if (other.getVcpus() != null && other.getVcpus().equals(this.getVcpus()) == false) return false; if (other.getMemory() == null ^ this.getMemory() == null) return false; if (other.getMemory() != null && other.getMemory().equals(this.getMemory()) == false) return false; if (other.getCommand() == null ^ this.getCommand() == null) return false; if (other.getCommand() != null && other.getCommand().equals(this.getCommand()) == false) return false; if (other.getJobRoleArn() == null ^ this.getJobRoleArn() == null) return false; if (other.getJobRoleArn() != null && other.getJobRoleArn().equals(this.getJobRoleArn()) == false) return false; if (other.getExecutionRoleArn() == null ^ this.getExecutionRoleArn() == null) return false; if (other.getExecutionRoleArn() != null && other.getExecutionRoleArn().equals(this.getExecutionRoleArn()) == false) return false; if (other.getVolumes() == null ^ this.getVolumes() == null) return false; if (other.getVolumes() != null && other.getVolumes().equals(this.getVolumes()) == 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.getMountPoints() == null ^ this.getMountPoints() == null) return false; if (other.getMountPoints() != null && other.getMountPoints().equals(this.getMountPoints()) == 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.getPrivileged() == null ^ this.getPrivileged() == null) return false; if (other.getPrivileged() != null && other.getPrivileged().equals(this.getPrivileged()) == 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.getInstanceType() == null ^ this.getInstanceType() == null) return false; if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == 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.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.getSecrets() == null ^ this.getSecrets() == null) return false; if (other.getSecrets() != null && other.getSecrets().equals(this.getSecrets()) == false) return false; if (other.getNetworkConfiguration() == null ^ this.getNetworkConfiguration() == null) return false; if (other.getNetworkConfiguration() != null && other.getNetworkConfiguration().equals(this.getNetworkConfiguration()) == false) return false; if (other.getFargatePlatformConfiguration() == null ^ this.getFargatePlatformConfiguration() == null) return false; if (other.getFargatePlatformConfiguration() != null && other.getFargatePlatformConfiguration().equals(this.getFargatePlatformConfiguration()) == false) return false; if (other.getEphemeralStorage() == null ^ this.getEphemeralStorage() == null) return false; if (other.getEphemeralStorage() != null && other.getEphemeralStorage().equals(this.getEphemeralStorage()) == false) return false; if (other.getRuntimePlatform() == null ^ this.getRuntimePlatform() == null) return false; if (other.getRuntimePlatform() != null && other.getRuntimePlatform().equals(this.getRuntimePlatform()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getVcpus() == null) ? 0 : getVcpus().hashCode()); hashCode = prime * hashCode + ((getMemory() == null) ? 0 : getMemory().hashCode()); hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getJobRoleArn() == null) ? 0 : getJobRoleArn().hashCode()); hashCode = prime * hashCode + ((getExecutionRoleArn() == null) ? 0 : getExecutionRoleArn().hashCode()); hashCode = prime * hashCode + ((getVolumes() == null) ? 0 : getVolumes().hashCode()); hashCode = prime * hashCode + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode()); hashCode = prime * hashCode + ((getMountPoints() == null) ? 0 : getMountPoints().hashCode()); hashCode = prime * hashCode + ((getReadonlyRootFilesystem() == null) ? 0 : getReadonlyRootFilesystem().hashCode()); hashCode = prime * hashCode + ((getPrivileged() == null) ? 0 : getPrivileged().hashCode()); hashCode = prime * hashCode + ((getUlimits() == null) ? 0 : getUlimits().hashCode()); hashCode = prime * hashCode + ((getUser() == null) ? 0 : getUser().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getResourceRequirements() == null) ? 0 : getResourceRequirements().hashCode()); hashCode = prime * hashCode + ((getLinuxParameters() == null) ? 0 : getLinuxParameters().hashCode()); hashCode = prime * hashCode + ((getLogConfiguration() == null) ? 0 : getLogConfiguration().hashCode()); hashCode = prime * hashCode + ((getSecrets() == null) ? 0 : getSecrets().hashCode()); hashCode = prime * hashCode + ((getNetworkConfiguration() == null) ? 0 : getNetworkConfiguration().hashCode()); hashCode = prime * hashCode + ((getFargatePlatformConfiguration() == null) ? 0 : getFargatePlatformConfiguration().hashCode()); hashCode = prime * hashCode + ((getEphemeralStorage() == null) ? 0 : getEphemeralStorage().hashCode()); hashCode = prime * hashCode + ((getRuntimePlatform() == null) ? 0 : getRuntimePlatform().hashCode()); return hashCode; } @Override public ContainerProperties clone() { try { return (ContainerProperties) 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.ContainerPropertiesMarshaller.getInstance().marshall(this, protocolMarshaller); } }