com.amazonaws.services.batch.model.ContainerDetail Maven / Gradle / Ivy
Show all versions of aws-java-sdk-batch Show documentation
/*
* 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;
/**
*
* An object that represents the details of a container that's part of a job.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ContainerDetail implements Serializable, Cloneable, StructuredPojo {
/**
*
* The image used to start the container.
*
*/
private String image;
/**
*
* The number of vCPUs reserved for the container. For jobs that run on Amazon EC2 resources, you can specify the
* vCPU requirement for the job using resourceRequirements
, but you can't specify the vCPU requirements
* in both the vcpus
and resourceRequirements
object. This parameter maps to
* CpuShares
in the Create a
* container section of the Docker Remote API and the
* --cpu-shares
option to docker run. Each
* vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is required but can be specified
* in several places. It must be specified for each node at least once.
*
*
*
* This parameter isn't applicable to jobs that run on Fargate resources. For jobs that run on Fargate resources,
* you must specify the vCPU requirement for the job using resourceRequirements
.
*
*
*/
private Integer vcpus;
/**
*
* For jobs running on Amazon EC2 resources that didn't specify memory requirements using
* resourceRequirements
, the number of MiB of memory reserved for the job. For other jobs, including
* all run on Fargate resources, see resourceRequirements
.
*
*/
private Integer memory;
/**
*
* The command that's passed to the container.
*
*/
private java.util.List command;
/**
*
* The Amazon Resource Name (ARN) that's associated with the job when run.
*
*/
private String jobRoleArn;
/**
*
* The Amazon Resource Name (ARN) of the execution role that Batch can assume. For more information, see Batch execution IAM role in
* the Batch User Guide.
*
*/
private String executionRoleArn;
/**
*
* A list of volumes that are associated with the job.
*
*/
private java.util.List volumes;
/**
*
* The environment variables to pass to a container.
*
*
*
* Environment variables cannot start with "AWS_BATCH
". This naming convention is reserved for
* variables that Batch sets.
*
*
*/
private java.util.List environment;
/**
*
* The mount points for data volumes in your container.
*
*/
private java.util.List mountPoints;
/**
*
* 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
.
*
*/
private Boolean readonlyRootFilesystem;
/**
*
* A list of ulimit
values 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.
*
*
*/
private java.util.List ulimits;
/**
*
* When this parameter is true, the container is given elevated permissions on the host container instance (similar
* to the root
user). 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
.
*
*
*/
private Boolean privileged;
/**
*
* 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.
*
*/
private String user;
/**
*
* The exit code returned upon completion.
*
*/
private Integer exitCode;
/**
*
* A short (255 max characters) human-readable string to provide additional details for a running or stopped
* container.
*
*/
private String reason;
/**
*
* The Amazon Resource Name (ARN) of the container instance that the container is running on.
*
*/
private String containerInstanceArn;
/**
*
* The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the container job. Each container
* attempt receives a task ARN when they reach the STARTING
status.
*
*/
private String taskArn;
/**
*
* The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for Batch
* jobs is /aws/batch/job
. Each container attempt receives a log stream name when they reach the
* RUNNING
status.
*
*/
private String logStreamName;
/**
*
* The instance type of the underlying host infrastructure of a multi-node parallel job.
*
*
*
* This parameter isn't applicable to jobs that are running on Fargate resources.
*
*
*/
private String instanceType;
/**
*
* The network interfaces that are associated with the job.
*
*/
private java.util.List networkInterfaces;
/**
*
* The type and amount of resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
*/
private java.util.List resourceRequirements;
/**
*
* 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,
* alternatively, it must be configured 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). Additional log drivers might 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 | 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.
*
*
*/
private LogConfiguration logConfiguration;
/**
*
* The secrets to pass to the container. For more information, see Specifying sensitive
* data in the Batch User Guide.
*
*/
private java.util.List secrets;
/**
*
* The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon 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 Amazon EC2
* resources must not specify this parameter.
*
*/
private FargatePlatformConfiguration fargatePlatformConfiguration;
/**
*
* The amount of ephemeral storage allocated 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;
/**
*
* An object that represents the compute environment architecture for Batch jobs on Fargate.
*
*/
private RuntimePlatform runtimePlatform;
/**
*
* The private repository authentication credentials to use.
*
*/
private RepositoryCredentials repositoryCredentials;
/**
*
* The image used to start the container.
*
*
* @param image
* The image used to start the container.
*/
public void setImage(String image) {
this.image = image;
}
/**
*
* The image used to start the container.
*
*
* @return The image used to start the container.
*/
public String getImage() {
return this.image;
}
/**
*
* The image used to start the container.
*
*
* @param image
* The image used to start the container.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withImage(String image) {
setImage(image);
return this;
}
/**
*
* The number of vCPUs reserved for the container. For jobs that run on Amazon EC2 resources, you can specify the
* vCPU requirement for the job using resourceRequirements
, but you can't specify the vCPU requirements
* in both the vcpus
and resourceRequirements
object. This parameter maps to
* CpuShares
in the Create a
* container section of the Docker Remote API and the
* --cpu-shares
option to docker run. Each
* vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is required but can be specified
* in several places. It must be specified for each node at least once.
*
*
*
* This parameter isn't applicable to jobs that run on Fargate resources. For jobs that run on Fargate resources,
* you must specify the vCPU requirement for the job using resourceRequirements
.
*
*
*
* @param vcpus
* The number of vCPUs reserved for the container. For jobs that run on Amazon EC2 resources, you can specify
* the vCPU requirement for the job using resourceRequirements
, but you can't specify the vCPU
* requirements in both the vcpus
and resourceRequirements
object. This parameter
* maps to CpuShares
in the Create a container section of the
* Docker Remote API and the
* --cpu-shares
option to docker
* run. Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is required
* but can be specified in several places. It must be specified for each node at least once.
*
* This parameter isn't applicable to jobs that run on Fargate resources. For jobs that run on Fargate
* resources, you must specify the vCPU requirement for the job using resourceRequirements
.
*
*/
public void setVcpus(Integer vcpus) {
this.vcpus = vcpus;
}
/**
*
* The number of vCPUs reserved for the container. For jobs that run on Amazon EC2 resources, you can specify the
* vCPU requirement for the job using resourceRequirements
, but you can't specify the vCPU requirements
* in both the vcpus
and resourceRequirements
object. This parameter maps to
* CpuShares
in the Create a
* container section of the Docker Remote API and the
* --cpu-shares
option to docker run. Each
* vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is required but can be specified
* in several places. It must be specified for each node at least once.
*
*
*
* This parameter isn't applicable to jobs that run on Fargate resources. For jobs that run on Fargate resources,
* you must specify the vCPU requirement for the job using resourceRequirements
.
*
*
*
* @return The number of vCPUs reserved for the container. For jobs that run on Amazon EC2 resources, you can
* specify the vCPU requirement for the job using resourceRequirements
, but you can't specify
* the vCPU requirements in both the vcpus
and resourceRequirements
object. This
* parameter maps to CpuShares
in the Create a container section of the
* Docker Remote API and the
* --cpu-shares
option to docker
* run. Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is
* required but can be specified in several places. It must be specified for each node at least once.
*
*
* This parameter isn't applicable to jobs that run on Fargate resources. For jobs that run on Fargate
* resources, you must specify the vCPU requirement for the job using resourceRequirements
.
*
*/
public Integer getVcpus() {
return this.vcpus;
}
/**
*
* The number of vCPUs reserved for the container. For jobs that run on Amazon EC2 resources, you can specify the
* vCPU requirement for the job using resourceRequirements
, but you can't specify the vCPU requirements
* in both the vcpus
and resourceRequirements
object. This parameter maps to
* CpuShares
in the Create a
* container section of the Docker Remote API and the
* --cpu-shares
option to docker run. Each
* vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is required but can be specified
* in several places. It must be specified for each node at least once.
*
*
*
* This parameter isn't applicable to jobs that run on Fargate resources. For jobs that run on Fargate resources,
* you must specify the vCPU requirement for the job using resourceRequirements
.
*
*
*
* @param vcpus
* The number of vCPUs reserved for the container. For jobs that run on Amazon EC2 resources, you can specify
* the vCPU requirement for the job using resourceRequirements
, but you can't specify the vCPU
* requirements in both the vcpus
and resourceRequirements
object. This parameter
* maps to CpuShares
in the Create a container section of the
* Docker Remote API and the
* --cpu-shares
option to docker
* run. Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU. This is required
* but can be specified in several places. It must be specified for each node at least once.
*
* This parameter isn't applicable to jobs that run on Fargate resources. For jobs that run on Fargate
* resources, you must specify the vCPU requirement for the job using resourceRequirements
.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withVcpus(Integer vcpus) {
setVcpus(vcpus);
return this;
}
/**
*
* For jobs running on Amazon EC2 resources that didn't specify memory requirements using
* resourceRequirements
, the number of MiB of memory reserved for the job. For other jobs, including
* all run on Fargate resources, see resourceRequirements
.
*
*
* @param memory
* For jobs running on Amazon EC2 resources that didn't specify memory requirements using
* resourceRequirements
, the number of MiB of memory reserved for the job. For other jobs,
* including all run on Fargate resources, see resourceRequirements
.
*/
public void setMemory(Integer memory) {
this.memory = memory;
}
/**
*
* For jobs running on Amazon EC2 resources that didn't specify memory requirements using
* resourceRequirements
, the number of MiB of memory reserved for the job. For other jobs, including
* all run on Fargate resources, see resourceRequirements
.
*
*
* @return For jobs running on Amazon EC2 resources that didn't specify memory requirements using
* resourceRequirements
, the number of MiB of memory reserved for the job. For other jobs,
* including all run on Fargate resources, see resourceRequirements
.
*/
public Integer getMemory() {
return this.memory;
}
/**
*
* For jobs running on Amazon EC2 resources that didn't specify memory requirements using
* resourceRequirements
, the number of MiB of memory reserved for the job. For other jobs, including
* all run on Fargate resources, see resourceRequirements
.
*
*
* @param memory
* For jobs running on Amazon EC2 resources that didn't specify memory requirements using
* resourceRequirements
, the number of MiB of memory reserved for the job. For other jobs,
* including all run on Fargate resources, see resourceRequirements
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withMemory(Integer memory) {
setMemory(memory);
return this;
}
/**
*
* The command that's passed to the container.
*
*
* @return The command that's passed to the container.
*/
public java.util.List getCommand() {
return command;
}
/**
*
* The command that's passed to the container.
*
*
* @param command
* The command that's passed to the container.
*/
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.
*
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail 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.
*
*
* @param command
* The command that's passed to the container.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withCommand(java.util.Collection command) {
setCommand(command);
return this;
}
/**
*
* The Amazon Resource Name (ARN) that's associated with the job when run.
*
*
* @param jobRoleArn
* The Amazon Resource Name (ARN) that's associated with the job when run.
*/
public void setJobRoleArn(String jobRoleArn) {
this.jobRoleArn = jobRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) that's associated with the job when run.
*
*
* @return The Amazon Resource Name (ARN) that's associated with the job when run.
*/
public String getJobRoleArn() {
return this.jobRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) that's associated with the job when run.
*
*
* @param jobRoleArn
* The Amazon Resource Name (ARN) that's associated with the job when run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withJobRoleArn(String jobRoleArn) {
setJobRoleArn(jobRoleArn);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the execution role that Batch can assume. 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 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 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 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 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 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 ContainerDetail withExecutionRoleArn(String executionRoleArn) {
setExecutionRoleArn(executionRoleArn);
return this;
}
/**
*
* A list of volumes that are associated with the job.
*
*
* @return A list of volumes that are associated with the job.
*/
public java.util.List getVolumes() {
return volumes;
}
/**
*
* A list of volumes that are associated with the job.
*
*
* @param volumes
* A list of volumes that are associated with the job.
*/
public void setVolumes(java.util.Collection volumes) {
if (volumes == null) {
this.volumes = null;
return;
}
this.volumes = new java.util.ArrayList(volumes);
}
/**
*
* A list of volumes that are associated with the 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 volumes that are associated with the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withVolumes(Volume... volumes) {
if (this.volumes == null) {
setVolumes(new java.util.ArrayList(volumes.length));
}
for (Volume ele : volumes) {
this.volumes.add(ele);
}
return this;
}
/**
*
* A list of volumes that are associated with the job.
*
*
* @param volumes
* A list of volumes that are associated with the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withVolumes(java.util.Collection volumes) {
setVolumes(volumes);
return this;
}
/**
*
* The environment variables to pass to a container.
*
*
*
* 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.
*
* 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.
*
*
*
* 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.
*
* 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.
*
*
*
* 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.
*
* 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 ContainerDetail 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.
*
*
*
* 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.
*
* 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 ContainerDetail withEnvironment(java.util.Collection environment) {
setEnvironment(environment);
return this;
}
/**
*
* The mount points for data volumes in your container.
*
*
* @return The mount points for data volumes in your container.
*/
public java.util.List getMountPoints() {
return mountPoints;
}
/**
*
* The mount points for data volumes in your container.
*
*
* @param mountPoints
* The mount points for data volumes in your container.
*/
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.
*
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail 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.
*
*
* @param mountPoints
* The mount points for data volumes in your container.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withMountPoints(java.util.Collection mountPoints) {
setMountPoints(mountPoints);
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
.
*
*
* @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
* .
*/
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
.
*
*
* @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
.
*/
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
.
*
*
* @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
* .
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail 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
.
*
*
* @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
.
*/
public Boolean isReadonlyRootFilesystem() {
return this.readonlyRootFilesystem;
}
/**
*
* A list of ulimit
values 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.
*
*
*
* @return A list of ulimit
values 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.
*
*/
public java.util.List getUlimits() {
return ulimits;
}
/**
*
* A list of ulimit
values 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.
*
*
*
* @param ulimits
* A list of ulimit
values 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.
*
*/
public void setUlimits(java.util.Collection ulimits) {
if (ulimits == null) {
this.ulimits = null;
return;
}
this.ulimits = new java.util.ArrayList(ulimits);
}
/**
*
* A list of ulimit
values 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.
*
*
*
* 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 ulimit
values 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail 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 ulimit
values 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.
*
*
*
* @param ulimits
* A list of ulimit
values 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withUlimits(java.util.Collection ulimits) {
setUlimits(ulimits);
return this;
}
/**
*
* When this parameter is true, the container is given elevated permissions on the host container instance (similar
* to the root
user). 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
.
*
*
*
* @param privileged
* When this parameter is true, the container is given elevated permissions on the host container instance
* (similar to the root
user). 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). 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 When this parameter is true, the container is given elevated permissions on the host container instance
* (similar to the root
user). 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). 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
.
*
*
*
* @param privileged
* When this parameter is true, the container is given elevated permissions on the host container instance
* (similar to the root
user). 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 ContainerDetail 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). 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 When this parameter is true, the container is given elevated permissions on the host container instance
* (similar to the root
user). 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;
}
/**
*
* 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.
*
*
* @param 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.
*/
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.
*
*
* @return 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.
*/
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.
*
*
* @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withUser(String user) {
setUser(user);
return this;
}
/**
*
* The exit code returned upon completion.
*
*
* @param exitCode
* The exit code returned upon completion.
*/
public void setExitCode(Integer exitCode) {
this.exitCode = exitCode;
}
/**
*
* The exit code returned upon completion.
*
*
* @return The exit code returned upon completion.
*/
public Integer getExitCode() {
return this.exitCode;
}
/**
*
* The exit code returned upon completion.
*
*
* @param exitCode
* The exit code returned upon completion.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withExitCode(Integer exitCode) {
setExitCode(exitCode);
return this;
}
/**
*
* A short (255 max characters) human-readable string to provide additional details for a running or stopped
* container.
*
*
* @param reason
* A short (255 max characters) human-readable string to provide additional details for a running or stopped
* container.
*/
public void setReason(String reason) {
this.reason = reason;
}
/**
*
* A short (255 max characters) human-readable string to provide additional details for a running or stopped
* container.
*
*
* @return A short (255 max characters) human-readable string to provide additional details for a running or stopped
* container.
*/
public String getReason() {
return this.reason;
}
/**
*
* A short (255 max characters) human-readable string to provide additional details for a running or stopped
* container.
*
*
* @param reason
* A short (255 max characters) human-readable string to provide additional details for a running or stopped
* container.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withReason(String reason) {
setReason(reason);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the container instance that the container is running on.
*
*
* @param containerInstanceArn
* The Amazon Resource Name (ARN) of the container instance that the container is running on.
*/
public void setContainerInstanceArn(String containerInstanceArn) {
this.containerInstanceArn = containerInstanceArn;
}
/**
*
* The Amazon Resource Name (ARN) of the container instance that the container is running on.
*
*
* @return The Amazon Resource Name (ARN) of the container instance that the container is running on.
*/
public String getContainerInstanceArn() {
return this.containerInstanceArn;
}
/**
*
* The Amazon Resource Name (ARN) of the container instance that the container is running on.
*
*
* @param containerInstanceArn
* The Amazon Resource Name (ARN) of the container instance that the container is running on.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withContainerInstanceArn(String containerInstanceArn) {
setContainerInstanceArn(containerInstanceArn);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the container job. Each container
* attempt receives a task ARN when they reach the STARTING
status.
*
*
* @param taskArn
* The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the container job. Each
* container attempt receives a task ARN when they reach the STARTING
status.
*/
public void setTaskArn(String taskArn) {
this.taskArn = taskArn;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the container job. Each container
* attempt receives a task ARN when they reach the STARTING
status.
*
*
* @return The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the container job. Each
* container attempt receives a task ARN when they reach the STARTING
status.
*/
public String getTaskArn() {
return this.taskArn;
}
/**
*
* The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the container job. Each container
* attempt receives a task ARN when they reach the STARTING
status.
*
*
* @param taskArn
* The Amazon Resource Name (ARN) of the Amazon ECS task that's associated with the container job. Each
* container attempt receives a task ARN when they reach the STARTING
status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withTaskArn(String taskArn) {
setTaskArn(taskArn);
return this;
}
/**
*
* The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for Batch
* jobs is /aws/batch/job
. Each container attempt receives a log stream name when they reach the
* RUNNING
status.
*
*
* @param logStreamName
* The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for
* Batch jobs is /aws/batch/job
. Each container attempt receives a log stream name when they
* reach the RUNNING
status.
*/
public void setLogStreamName(String logStreamName) {
this.logStreamName = logStreamName;
}
/**
*
* The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for Batch
* jobs is /aws/batch/job
. Each container attempt receives a log stream name when they reach the
* RUNNING
status.
*
*
* @return The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for
* Batch jobs is /aws/batch/job
. Each container attempt receives a log stream name when they
* reach the RUNNING
status.
*/
public String getLogStreamName() {
return this.logStreamName;
}
/**
*
* The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for Batch
* jobs is /aws/batch/job
. Each container attempt receives a log stream name when they reach the
* RUNNING
status.
*
*
* @param logStreamName
* The name of the Amazon CloudWatch Logs log stream that's associated with the container. The log group for
* Batch jobs is /aws/batch/job
. Each container attempt receives a log stream name when they
* reach the RUNNING
status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withLogStreamName(String logStreamName) {
setLogStreamName(logStreamName);
return this;
}
/**
*
* The instance type of the underlying host infrastructure of a multi-node parallel job.
*
*
*
* This parameter isn't applicable to jobs that are running on Fargate resources.
*
*
*
* @param instanceType
* The instance type of the underlying host infrastructure of a multi-node parallel job.
*
* This parameter isn't applicable to jobs that are running on Fargate resources.
*
*/
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}
/**
*
* The instance type of the underlying host infrastructure of a multi-node parallel job.
*
*
*
* This parameter isn't applicable to jobs that are running on Fargate resources.
*
*
*
* @return The instance type of the underlying host infrastructure of a multi-node parallel job.
*
* This parameter isn't applicable to jobs that are running on Fargate resources.
*
*/
public String getInstanceType() {
return this.instanceType;
}
/**
*
* The instance type of the underlying host infrastructure of a multi-node parallel job.
*
*
*
* This parameter isn't applicable to jobs that are running on Fargate resources.
*
*
*
* @param instanceType
* The instance type of the underlying host infrastructure of a multi-node parallel job.
*
* This parameter isn't applicable to jobs that are running on Fargate resources.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withInstanceType(String instanceType) {
setInstanceType(instanceType);
return this;
}
/**
*
* The network interfaces that are associated with the job.
*
*
* @return The network interfaces that are associated with the job.
*/
public java.util.List getNetworkInterfaces() {
return networkInterfaces;
}
/**
*
* The network interfaces that are associated with the job.
*
*
* @param networkInterfaces
* The network interfaces that are associated with the job.
*/
public void setNetworkInterfaces(java.util.Collection networkInterfaces) {
if (networkInterfaces == null) {
this.networkInterfaces = null;
return;
}
this.networkInterfaces = new java.util.ArrayList(networkInterfaces);
}
/**
*
* The network interfaces that are associated with the job.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setNetworkInterfaces(java.util.Collection)} or {@link #withNetworkInterfaces(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param networkInterfaces
* The network interfaces that are associated with the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withNetworkInterfaces(NetworkInterface... networkInterfaces) {
if (this.networkInterfaces == null) {
setNetworkInterfaces(new java.util.ArrayList(networkInterfaces.length));
}
for (NetworkInterface ele : networkInterfaces) {
this.networkInterfaces.add(ele);
}
return this;
}
/**
*
* The network interfaces that are associated with the job.
*
*
* @param networkInterfaces
* The network interfaces that are associated with the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withNetworkInterfaces(java.util.Collection networkInterfaces) {
setNetworkInterfaces(networkInterfaces);
return this;
}
/**
*
* The type and amount of resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
*
* @return The type and amount of resources to assign to a container. The supported resources include
* GPU
, MEMORY
, and VCPU
.
*/
public java.util.List getResourceRequirements() {
return resourceRequirements;
}
/**
*
* The type and amount of resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
*
* @param resourceRequirements
* The type and amount of resources to assign to a container. The supported resources include
* GPU
, MEMORY
, and VCPU
.
*/
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 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 ContainerDetail 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 resources to assign to a container. The supported resources include GPU
,
* MEMORY
, and VCPU
.
*
*
* @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 ContainerDetail withResourceRequirements(java.util.Collection resourceRequirements) {
setResourceRequirements(resourceRequirements);
return this;
}
/**
*
* 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 ContainerDetail 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,
* alternatively, it must be configured 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). Additional log drivers might 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 | 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.
*
*
*
* @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 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, alternatively, it must be configured 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). Additional log drivers might 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 | 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.
*
*/
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 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,
* alternatively, it must be configured 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). Additional log drivers might 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 | 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.
*
*
*
* @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 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, alternatively, it must be configured 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). Additional log drivers might 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 | 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.
*
*/
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 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,
* alternatively, it must be configured 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). Additional log drivers might 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 | 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.
*
*
*
* @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 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, alternatively, it must be configured 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). Additional log drivers might 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 | 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withLogConfiguration(LogConfiguration logConfiguration) {
setLogConfiguration(logConfiguration);
return this;
}
/**
*
* The secrets to pass to the container. For more information, see Specifying sensitive
* data in the Batch User Guide.
*
*
* @return The secrets to pass to the container. For more information, see Specifying
* sensitive data in the Batch User Guide.
*/
public java.util.List getSecrets() {
return secrets;
}
/**
*
* The secrets to pass to the container. For more information, see Specifying sensitive
* data in the Batch User Guide.
*
*
* @param secrets
* The secrets to pass to the container. For more information, see Specifying
* sensitive data in the Batch User 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 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 to pass to 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 ContainerDetail 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 Batch User Guide.
*
*
* @param secrets
* The secrets to pass to 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 ContainerDetail withSecrets(java.util.Collection secrets) {
setSecrets(secrets);
return this;
}
/**
*
* The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon 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 Amazon
* 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 Amazon EC2
* resources must not specify this parameter.
*
*
* @return The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon
* 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 Amazon 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 Amazon
* EC2 resources must not specify this parameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withNetworkConfiguration(NetworkConfiguration networkConfiguration) {
setNetworkConfiguration(networkConfiguration);
return this;
}
/**
*
* The platform configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon 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 Amazon
* 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 Amazon EC2
* resources must not specify this parameter.
*
*
* @return The platform configuration for jobs that are running on Fargate resources. Jobs that are running on
* Amazon 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 Amazon 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 Amazon
* EC2 resources must not specify this parameter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withFargatePlatformConfiguration(FargatePlatformConfiguration fargatePlatformConfiguration) {
setFargatePlatformConfiguration(fargatePlatformConfiguration);
return this;
}
/**
*
* The amount of ephemeral storage allocated 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 allocated 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 allocated 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 allocated 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 allocated 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 allocated 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 ContainerDetail withEphemeralStorage(EphemeralStorage ephemeralStorage) {
setEphemeralStorage(ephemeralStorage);
return this;
}
/**
*
* An object that represents the compute environment architecture for Batch jobs on Fargate.
*
*
* @param runtimePlatform
* An object that represents the compute environment architecture for Batch jobs on Fargate.
*/
public void setRuntimePlatform(RuntimePlatform runtimePlatform) {
this.runtimePlatform = runtimePlatform;
}
/**
*
* An object that represents the compute environment architecture for Batch jobs on Fargate.
*
*
* @return An object that represents the compute environment architecture for Batch jobs on Fargate.
*/
public RuntimePlatform getRuntimePlatform() {
return this.runtimePlatform;
}
/**
*
* An object that represents the compute environment architecture for Batch jobs on Fargate.
*
*
* @param runtimePlatform
* An object that represents the compute environment architecture for Batch jobs on Fargate.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerDetail withRuntimePlatform(RuntimePlatform runtimePlatform) {
setRuntimePlatform(runtimePlatform);
return this;
}
/**
*
* 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 ContainerDetail withRepositoryCredentials(RepositoryCredentials repositoryCredentials) {
setRepositoryCredentials(repositoryCredentials);
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 (getUlimits() != null)
sb.append("Ulimits: ").append(getUlimits()).append(",");
if (getPrivileged() != null)
sb.append("Privileged: ").append(getPrivileged()).append(",");
if (getUser() != null)
sb.append("User: ").append(getUser()).append(",");
if (getExitCode() != null)
sb.append("ExitCode: ").append(getExitCode()).append(",");
if (getReason() != null)
sb.append("Reason: ").append(getReason()).append(",");
if (getContainerInstanceArn() != null)
sb.append("ContainerInstanceArn: ").append(getContainerInstanceArn()).append(",");
if (getTaskArn() != null)
sb.append("TaskArn: ").append(getTaskArn()).append(",");
if (getLogStreamName() != null)
sb.append("LogStreamName: ").append(getLogStreamName()).append(",");
if (getInstanceType() != null)
sb.append("InstanceType: ").append(getInstanceType()).append(",");
if (getNetworkInterfaces() != null)
sb.append("NetworkInterfaces: ").append(getNetworkInterfaces()).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()).append(",");
if (getRepositoryCredentials() != null)
sb.append("RepositoryCredentials: ").append(getRepositoryCredentials());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ContainerDetail == false)
return false;
ContainerDetail other = (ContainerDetail) 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.getUlimits() == null ^ this.getUlimits() == null)
return false;
if (other.getUlimits() != null && other.getUlimits().equals(this.getUlimits()) == 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.getUser() == null ^ this.getUser() == null)
return false;
if (other.getUser() != null && other.getUser().equals(this.getUser()) == false)
return false;
if (other.getExitCode() == null ^ this.getExitCode() == null)
return false;
if (other.getExitCode() != null && other.getExitCode().equals(this.getExitCode()) == false)
return false;
if (other.getReason() == null ^ this.getReason() == null)
return false;
if (other.getReason() != null && other.getReason().equals(this.getReason()) == false)
return false;
if (other.getContainerInstanceArn() == null ^ this.getContainerInstanceArn() == null)
return false;
if (other.getContainerInstanceArn() != null && other.getContainerInstanceArn().equals(this.getContainerInstanceArn()) == false)
return false;
if (other.getTaskArn() == null ^ this.getTaskArn() == null)
return false;
if (other.getTaskArn() != null && other.getTaskArn().equals(this.getTaskArn()) == false)
return false;
if (other.getLogStreamName() == null ^ this.getLogStreamName() == null)
return false;
if (other.getLogStreamName() != null && other.getLogStreamName().equals(this.getLogStreamName()) == false)
return false;
if (other.getInstanceType() == null ^ this.getInstanceType() == null)
return false;
if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false)
return false;
if (other.getNetworkInterfaces() == null ^ this.getNetworkInterfaces() == null)
return false;
if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals(this.getNetworkInterfaces()) == 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;
if (other.getRepositoryCredentials() == null ^ this.getRepositoryCredentials() == null)
return false;
if (other.getRepositoryCredentials() != null && other.getRepositoryCredentials().equals(this.getRepositoryCredentials()) == 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 + ((getUlimits() == null) ? 0 : getUlimits().hashCode());
hashCode = prime * hashCode + ((getPrivileged() == null) ? 0 : getPrivileged().hashCode());
hashCode = prime * hashCode + ((getUser() == null) ? 0 : getUser().hashCode());
hashCode = prime * hashCode + ((getExitCode() == null) ? 0 : getExitCode().hashCode());
hashCode = prime * hashCode + ((getReason() == null) ? 0 : getReason().hashCode());
hashCode = prime * hashCode + ((getContainerInstanceArn() == null) ? 0 : getContainerInstanceArn().hashCode());
hashCode = prime * hashCode + ((getTaskArn() == null) ? 0 : getTaskArn().hashCode());
hashCode = prime * hashCode + ((getLogStreamName() == null) ? 0 : getLogStreamName().hashCode());
hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode());
hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().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());
hashCode = prime * hashCode + ((getRepositoryCredentials() == null) ? 0 : getRepositoryCredentials().hashCode());
return hashCode;
}
@Override
public ContainerDetail clone() {
try {
return (ContainerDetail) 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.ContainerDetailMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}