@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TaskContainerDetails extends Object implements Serializable, Cloneable, StructuredPojo
The details for the container in this task attempt.
Constructor and Description |
---|
TaskContainerDetails() |
Modifier and Type | Method and Description |
---|---|
TaskContainerDetails |
clone() |
boolean |
equals(Object obj) |
List<String> |
getCommand()
The command that's passed to the container.
|
List<TaskContainerDependency> |
getDependsOn()
A list of containers that this container depends on.
|
List<KeyValuePair> |
getEnvironment()
The environment variables to pass to a container.
|
Boolean |
getEssential()
If the essential parameter of a container is marked as
true , and that container fails or stops for
any reason, all other containers that are part of the task are stopped. |
Integer |
getExitCode()
The exit code returned upon completion.
|
String |
getImage()
The image used to start a container.
|
LinuxParameters |
getLinuxParameters()
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
|
LogConfiguration |
getLogConfiguration()
The log configuration specification for the container.
|
String |
getLogStreamName()
The name of the CloudWatch Logs log stream that's associated with the container.
|
List<MountPoint> |
getMountPoints()
The mount points for data volumes in your container.
|
String |
getName()
The name of a container.
|
List<NetworkInterface> |
getNetworkInterfaces()
The network interfaces that are associated with the job.
|
Boolean |
getPrivileged()
When this parameter is
true , the container is given elevated privileges on the host container
instance (similar to the root user). |
Boolean |
getReadonlyRootFilesystem()
When this parameter is true, the container is given read-only access to its root file system.
|
String |
getReason()
A short (255 max characters) human-readable string to provide additional details for a running or stopped
container.
|
RepositoryCredentials |
getRepositoryCredentials()
The private repository authentication credentials to use.
|
List<ResourceRequirement> |
getResourceRequirements()
The type and amount of a resource to assign to a container.
|
List<Secret> |
getSecrets()
The secrets to pass to the container.
|
List<Ulimit> |
getUlimits()
A list of
ulimits to set in the container. |
String |
getUser()
The user to use inside the container.
|
int |
hashCode() |
Boolean |
isEssential()
If the essential parameter of a container is marked as
true , and that container fails or stops for
any reason, all other containers that are part of the task are stopped. |
Boolean |
isPrivileged()
When this parameter is
true , the container is given elevated privileges on the host container
instance (similar to the root user). |
Boolean |
isReadonlyRootFilesystem()
When this parameter is true, the container is given read-only access to its root file system.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setCommand(Collection<String> command)
The command that's passed to the container.
|
void |
setDependsOn(Collection<TaskContainerDependency> dependsOn)
A list of containers that this container depends on.
|
void |
setEnvironment(Collection<KeyValuePair> environment)
The environment variables to pass to a container.
|
void |
setEssential(Boolean essential)
If the essential parameter of a container is marked as
true , and that container fails or stops for
any reason, all other containers that are part of the task are stopped. |
void |
setExitCode(Integer exitCode)
The exit code returned upon completion.
|
void |
setImage(String image)
The image used to start a container.
|
void |
setLinuxParameters(LinuxParameters linuxParameters)
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
|
void |
setLogConfiguration(LogConfiguration logConfiguration)
The log configuration specification for the container.
|
void |
setLogStreamName(String logStreamName)
The name of the CloudWatch Logs log stream that's associated with the container.
|
void |
setMountPoints(Collection<MountPoint> mountPoints)
The mount points for data volumes in your container.
|
void |
setName(String name)
The name of a container.
|
void |
setNetworkInterfaces(Collection<NetworkInterface> networkInterfaces)
The network interfaces that are associated with the job.
|
void |
setPrivileged(Boolean privileged)
When this parameter is
true , the container is given elevated privileges on the host container
instance (similar to the root user). |
void |
setReadonlyRootFilesystem(Boolean readonlyRootFilesystem)
When this parameter is true, the container is given read-only access to its root file system.
|
void |
setReason(String reason)
A short (255 max characters) human-readable string to provide additional details for a running or stopped
container.
|
void |
setRepositoryCredentials(RepositoryCredentials repositoryCredentials)
The private repository authentication credentials to use.
|
void |
setResourceRequirements(Collection<ResourceRequirement> resourceRequirements)
The type and amount of a resource to assign to a container.
|
void |
setSecrets(Collection<Secret> secrets)
The secrets to pass to the container.
|
void |
setUlimits(Collection<Ulimit> ulimits)
A list of
ulimits to set in the container. |
void |
setUser(String user)
The user to use inside the container.
|
String |
toString()
Returns a string representation of this object.
|
TaskContainerDetails |
withCommand(Collection<String> command)
The command that's passed to the container.
|
TaskContainerDetails |
withCommand(String... command)
The command that's passed to the container.
|
TaskContainerDetails |
withDependsOn(Collection<TaskContainerDependency> dependsOn)
A list of containers that this container depends on.
|
TaskContainerDetails |
withDependsOn(TaskContainerDependency... dependsOn)
A list of containers that this container depends on.
|
TaskContainerDetails |
withEnvironment(Collection<KeyValuePair> environment)
The environment variables to pass to a container.
|
TaskContainerDetails |
withEnvironment(KeyValuePair... environment)
The environment variables to pass to a container.
|
TaskContainerDetails |
withEssential(Boolean essential)
If the essential parameter of a container is marked as
true , and that container fails or stops for
any reason, all other containers that are part of the task are stopped. |
TaskContainerDetails |
withExitCode(Integer exitCode)
The exit code returned upon completion.
|
TaskContainerDetails |
withImage(String image)
The image used to start a container.
|
TaskContainerDetails |
withLinuxParameters(LinuxParameters linuxParameters)
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
|
TaskContainerDetails |
withLogConfiguration(LogConfiguration logConfiguration)
The log configuration specification for the container.
|
TaskContainerDetails |
withLogStreamName(String logStreamName)
The name of the CloudWatch Logs log stream that's associated with the container.
|
TaskContainerDetails |
withMountPoints(Collection<MountPoint> mountPoints)
The mount points for data volumes in your container.
|
TaskContainerDetails |
withMountPoints(MountPoint... mountPoints)
The mount points for data volumes in your container.
|
TaskContainerDetails |
withName(String name)
The name of a container.
|
TaskContainerDetails |
withNetworkInterfaces(Collection<NetworkInterface> networkInterfaces)
The network interfaces that are associated with the job.
|
TaskContainerDetails |
withNetworkInterfaces(NetworkInterface... networkInterfaces)
The network interfaces that are associated with the job.
|
TaskContainerDetails |
withPrivileged(Boolean privileged)
When this parameter is
true , the container is given elevated privileges on the host container
instance (similar to the root user). |
TaskContainerDetails |
withReadonlyRootFilesystem(Boolean readonlyRootFilesystem)
When this parameter is true, the container is given read-only access to its root file system.
|
TaskContainerDetails |
withReason(String reason)
A short (255 max characters) human-readable string to provide additional details for a running or stopped
container.
|
TaskContainerDetails |
withRepositoryCredentials(RepositoryCredentials repositoryCredentials)
The private repository authentication credentials to use.
|
TaskContainerDetails |
withResourceRequirements(Collection<ResourceRequirement> resourceRequirements)
The type and amount of a resource to assign to a container.
|
TaskContainerDetails |
withResourceRequirements(ResourceRequirement... resourceRequirements)
The type and amount of a resource to assign to a container.
|
TaskContainerDetails |
withSecrets(Collection<Secret> secrets)
The secrets to pass to the container.
|
TaskContainerDetails |
withSecrets(Secret... secrets)
The secrets to pass to the container.
|
TaskContainerDetails |
withUlimits(Collection<Ulimit> ulimits)
A list of
ulimits to set in the container. |
TaskContainerDetails |
withUlimits(Ulimit... ulimits)
A list of
ulimits to set in the container. |
TaskContainerDetails |
withUser(String user)
The user to use inside the container.
|
public List<String> getCommand()
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(Collection<String> command)
The command that's passed to the container. This parameter maps to Cmd
in the Create a container section of the Docker Remote API and the COMMAND
parameter to
docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd.
command
- The command that's passed to the container. This parameter maps to Cmd
in the Create a container section of the
Docker Remote API and the COMMAND
parameter to docker run. For more information,
see https://docs.docker.com/engine/reference
/builder/#cmd.public TaskContainerDetails withCommand(String... command)
The command that's passed to the container. This parameter maps to Cmd
in the Create a container section of the Docker Remote API and the COMMAND
parameter to
docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd.
NOTE: This method appends the values to the existing list (if any). Use
setCommand(java.util.Collection)
or withCommand(java.util.Collection)
if you want to override
the existing values.
command
- The command that's passed to the container. This parameter maps to Cmd
in the Create a container section of the
Docker Remote API and the COMMAND
parameter to docker run. For more information,
see https://docs.docker.com/engine/reference
/builder/#cmd.public TaskContainerDetails withCommand(Collection<String> command)
The command that's passed to the container. This parameter maps to Cmd
in the Create a container section of the Docker Remote API and the COMMAND
parameter to
docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd.
command
- The command that's passed to the container. This parameter maps to Cmd
in the Create a container section of the
Docker Remote API and the COMMAND
parameter to docker run. For more information,
see https://docs.docker.com/engine/reference
/builder/#cmd.public List<TaskContainerDependency> getDependsOn()
A list of containers that this container depends on.
public void setDependsOn(Collection<TaskContainerDependency> dependsOn)
A list of containers that this container depends on.
dependsOn
- A list of containers that this container depends on.public TaskContainerDetails withDependsOn(TaskContainerDependency... dependsOn)
A list of containers that this container depends on.
NOTE: This method appends the values to the existing list (if any). Use
setDependsOn(java.util.Collection)
or withDependsOn(java.util.Collection)
if you want to
override the existing values.
dependsOn
- A list of containers that this container depends on.public TaskContainerDetails withDependsOn(Collection<TaskContainerDependency> dependsOn)
A list of containers that this container depends on.
dependsOn
- A list of containers that this container depends on.public List<KeyValuePair> getEnvironment()
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.
Env
in the Create a container section of the
Docker Remote API and the --env
option to docker run. We don't recommend using plaintext environment variables for sensitive information, such as credential data.
public void setEnvironment(Collection<KeyValuePair> environment)
The environment variables to pass to a container. This parameter maps to Env
in the Create a container section of the Docker Remote API and the --env
option to docker run.
We don't recommend using plaintext environment variables for sensitive information, such as credential data.
environment
- The environment variables to pass to a container. This parameter maps to Env
in the Create a container section of the
Docker Remote API and the --env
option to docker run. We don't recommend using plaintext environment variables for sensitive information, such as credential data.
public TaskContainerDetails withEnvironment(KeyValuePair... environment)
The environment variables to pass to a container. This parameter maps to Env
in the Create a container section of the Docker Remote API and the --env
option to docker run.
We don't recommend using plaintext environment variables for sensitive information, such as credential data.
NOTE: This method appends the values to the existing list (if any). Use
setEnvironment(java.util.Collection)
or withEnvironment(java.util.Collection)
if you want to
override the existing values.
environment
- The environment variables to pass to a container. This parameter maps to Env
in the Create a container section of the
Docker Remote API and the --env
option to docker run. We don't recommend using plaintext environment variables for sensitive information, such as credential data.
public TaskContainerDetails withEnvironment(Collection<KeyValuePair> environment)
The environment variables to pass to a container. This parameter maps to Env
in the Create a container section of the Docker Remote API and the --env
option to docker run.
We don't recommend using plaintext environment variables for sensitive information, such as credential data.
environment
- The environment variables to pass to a container. This parameter maps to Env
in the Create a container section of the
Docker Remote API and the --env
option to docker run. We don't recommend using plaintext environment variables for sensitive information, such as credential data.
public void setEssential(Boolean essential)
If the essential parameter of a container is marked as true
, and that container fails or stops for
any reason, all other containers that are part of the task are stopped. If the essential
parameter
of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this
parameter is omitted, a container is assumed to be essential.
All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
essential
- If the essential parameter of a container is marked as true
, and that container fails or
stops for any reason, all other containers that are part of the task are stopped. If the
essential
parameter of a container is marked as false, its failure doesn't affect the rest of
the containers in a task. If this parameter is omitted, a container is assumed to be essential.
All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
public Boolean getEssential()
If the essential parameter of a container is marked as true
, and that container fails or stops for
any reason, all other containers that are part of the task are stopped. If the essential
parameter
of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this
parameter is omitted, a container is assumed to be essential.
All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
true
, and that container fails or
stops for any reason, all other containers that are part of the task are stopped. If the
essential
parameter of a container is marked as false, its failure doesn't affect the rest
of the containers in a task. If this parameter is omitted, a container is assumed to be essential.
All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
public TaskContainerDetails withEssential(Boolean essential)
If the essential parameter of a container is marked as true
, and that container fails or stops for
any reason, all other containers that are part of the task are stopped. If the essential
parameter
of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this
parameter is omitted, a container is assumed to be essential.
All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
essential
- If the essential parameter of a container is marked as true
, and that container fails or
stops for any reason, all other containers that are part of the task are stopped. If the
essential
parameter of a container is marked as false, its failure doesn't affect the rest of
the containers in a task. If this parameter is omitted, a container is assumed to be essential.
All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
public Boolean isEssential()
If the essential parameter of a container is marked as true
, and that container fails or stops for
any reason, all other containers that are part of the task are stopped. If the essential
parameter
of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this
parameter is omitted, a container is assumed to be essential.
All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
true
, and that container fails or
stops for any reason, all other containers that are part of the task are stopped. If the
essential
parameter of a container is marked as false, its failure doesn't affect the rest
of the containers in a task. If this parameter is omitted, a container is assumed to be essential.
All jobs must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide.
public void setImage(String image)
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in
the Docker Hub registry are available. Other repositories are specified with either
repository-url/image:tag
or repository-url/image@digest
. Up to 255 letters (uppercase
and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed.
This parameter maps to Image
in the Create a container section of the
Docker Remote API and the IMAGE
parameter of
the docker run .
image
- The image used to start a container. This string is passed directly to the Docker daemon. By default,
images in the Docker Hub registry are available. Other repositories are specified with either
repository-url/image:tag
or repository-url/image@digest
. Up to 255 letters
(uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number
signs are allowed. This parameter maps to Image
in the Create a container section
of the Docker Remote API and the
IMAGE
parameter of the docker run .public String getImage()
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in
the Docker Hub registry are available. Other repositories are specified with either
repository-url/image:tag
or repository-url/image@digest
. Up to 255 letters (uppercase
and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed.
This parameter maps to Image
in the Create a container section of the
Docker Remote API and the IMAGE
parameter of
the docker run .
repository-url/image:tag
or repository-url/image@digest
. Up to 255 letters
(uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number
signs are allowed. This parameter maps to Image
in the Create a container section
of the Docker Remote API and the
IMAGE
parameter of the docker run .public TaskContainerDetails withImage(String image)
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in
the Docker Hub registry are available. Other repositories are specified with either
repository-url/image:tag
or repository-url/image@digest
. Up to 255 letters (uppercase
and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed.
This parameter maps to Image
in the Create a container section of the
Docker Remote API and the IMAGE
parameter of
the docker run .
image
- The image used to start a container. This string is passed directly to the Docker daemon. By default,
images in the Docker Hub registry are available. Other repositories are specified with either
repository-url/image:tag
or repository-url/image@digest
. Up to 255 letters
(uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number
signs are allowed. This parameter maps to Image
in the Create a container section
of the Docker Remote API and the
IMAGE
parameter of the docker run .public void setLinuxParameters(LinuxParameters linuxParameters)
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities .
This parameter is not supported for Windows containers.
linuxParameters
- Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For
more information, see KernelCapabilities. This parameter is not supported for Windows containers.
public LinuxParameters getLinuxParameters()
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities .
This parameter is not supported for Windows containers.
This parameter is not supported for Windows containers.
public TaskContainerDetails withLinuxParameters(LinuxParameters linuxParameters)
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information, see KernelCapabilities .
This parameter is not supported for Windows containers.
linuxParameters
- Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For
more information, see KernelCapabilities. This parameter is not supported for Windows containers.
public void setLogConfiguration(LogConfiguration logConfiguration)
The log configuration specification for the container.
This parameter maps to LogConfig
in the Create a container section of the
Docker Remote API and the --log-driver
option to docker run.
By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of the
Amazon ECS container agent.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the
Docker Remote API version on your container instance, log in to your container instance and run the following
command: sudo docker version --format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers available on
that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before containers placed
on that instance can use these log configuration options. For more information, see Amazon ECS container
agent configuration in the Amazon Elastic Container Service Developer Guide.
logConfiguration
- The log configuration specification for the container.
This parameter maps to LogConfig
in the Create a container section
of the Docker Remote API and the
--log-driver
option to docker run.
By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of
the Amazon ECS container agent.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To
check the Docker Remote API version on your container instance, log in to your container instance and run
the following command: sudo docker version --format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers available
on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before
containers placed on that instance can use these log configuration options. For more information, see Amazon ECS
container agent configuration in the Amazon Elastic Container Service Developer Guide.
public LogConfiguration getLogConfiguration()
The log configuration specification for the container.
This parameter maps to LogConfig
in the Create a container section of the
Docker Remote API and the --log-driver
option to docker run.
By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of the
Amazon ECS container agent.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the
Docker Remote API version on your container instance, log in to your container instance and run the following
command: sudo docker version --format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers available on
that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before containers placed
on that instance can use these log configuration options. For more information, see Amazon ECS container
agent configuration in the Amazon Elastic Container Service Developer Guide.
This parameter maps to LogConfig
in the Create a container section
of the Docker Remote API and the
--log-driver
option to docker run.
By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in
the LogConfiguration
data type). Additional log drivers may be available in future releases
of the Amazon ECS container agent.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To
check the Docker Remote API version on your container instance, log in to your container instance and run
the following command: sudo docker version --format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers
available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
environment variable
before containers placed on that instance can use these log configuration options. For more information,
see Amazon
ECS container agent configuration in the Amazon Elastic Container Service Developer Guide.
public TaskContainerDetails withLogConfiguration(LogConfiguration logConfiguration)
The log configuration specification for the container.
This parameter maps to LogConfig
in the Create a container section of the
Docker Remote API and the --log-driver
option to docker run.
By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of the
Amazon ECS container agent.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the
Docker Remote API version on your container instance, log in to your container instance and run the following
command: sudo docker version --format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers available on
that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before containers placed
on that instance can use these log configuration options. For more information, see Amazon ECS container
agent configuration in the Amazon Elastic Container Service Developer Guide.
logConfiguration
- The log configuration specification for the container.
This parameter maps to LogConfig
in the Create a container section
of the Docker Remote API and the
--log-driver
option to docker run.
By default, containers use the same logging driver that the Docker daemon uses. However the container can use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information about the options for different supported log drivers, see Configure logging drivers in the Docker documentation.
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the
LogConfiguration
data type). Additional log drivers may be available in future releases of
the Amazon ECS container agent.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To
check the Docker Remote API version on your container instance, log in to your container instance and run
the following command: sudo docker version --format '{{.Server.APIVersion}}'
The Amazon ECS container agent running on a container instance must register the logging drivers available
on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS
environment variable before
containers placed on that instance can use these log configuration options. For more information, see Amazon ECS
container agent configuration in the Amazon Elastic Container Service Developer Guide.
public List<MountPoint> getMountPoints()
The mount points for data volumes in your container.
This parameter maps to Volumes
in the Create a container section of the
Docker Remote API and the --volume option
to docker run.
Windows containers can mount whole directories on the same drive as $env:ProgramData
. Windows
containers can't mount directories on a different drive, and mount point can't be across drives.
This parameter maps to Volumes
in the Create a container section
of the Docker Remote API and the --volume option to docker run.
Windows containers can mount whole directories on the same drive as $env:ProgramData
.
Windows containers can't mount directories on a different drive, and mount point can't be across drives.
public void setMountPoints(Collection<MountPoint> mountPoints)
The mount points for data volumes in your container.
This parameter maps to Volumes
in the Create a container section of the
Docker Remote API and the --volume option
to docker run.
Windows containers can mount whole directories on the same drive as $env:ProgramData
. Windows
containers can't mount directories on a different drive, and mount point can't be across drives.
mountPoints
- The mount points for data volumes in your container.
This parameter maps to Volumes
in the Create a container section
of the Docker Remote API and the --volume option to docker run.
Windows containers can mount whole directories on the same drive as $env:ProgramData
. Windows
containers can't mount directories on a different drive, and mount point can't be across drives.
public TaskContainerDetails withMountPoints(MountPoint... mountPoints)
The mount points for data volumes in your container.
This parameter maps to Volumes
in the Create a container section of the
Docker Remote API and the --volume option
to docker run.
Windows containers can mount whole directories on the same drive as $env:ProgramData
. Windows
containers can't mount directories on a different drive, and mount point can't be across drives.
NOTE: This method appends the values to the existing list (if any). Use
setMountPoints(java.util.Collection)
or withMountPoints(java.util.Collection)
if you want to
override the existing values.
mountPoints
- The mount points for data volumes in your container.
This parameter maps to Volumes
in the Create a container section
of the Docker Remote API and the --volume option to docker run.
Windows containers can mount whole directories on the same drive as $env:ProgramData
. Windows
containers can't mount directories on a different drive, and mount point can't be across drives.
public TaskContainerDetails withMountPoints(Collection<MountPoint> mountPoints)
The mount points for data volumes in your container.
This parameter maps to Volumes
in the Create a container section of the
Docker Remote API and the --volume option
to docker run.
Windows containers can mount whole directories on the same drive as $env:ProgramData
. Windows
containers can't mount directories on a different drive, and mount point can't be across drives.
mountPoints
- The mount points for data volumes in your container.
This parameter maps to Volumes
in the Create a container section
of the Docker Remote API and the --volume option to docker run.
Windows containers can mount whole directories on the same drive as $env:ProgramData
. Windows
containers can't mount directories on a different drive, and mount point can't be across drives.
public void setName(String name)
The name of a container.
name
- The name of a container.public String getName()
The name of a container.
public TaskContainerDetails withName(String name)
The name of a container.
name
- The name of a container.public void setPrivileged(Boolean privileged)
When this parameter is true
, the container is given elevated privileges on the host container
instance (similar to the root
user). This parameter maps to Privileged
in the Create a container section of the
Docker Remote API and the --privileged
option to docker run.
This parameter is not supported for Windows containers or tasks run on Fargate.
privileged
- When this parameter is true
, the container is given elevated privileges on the host container
instance (similar to the root
user). This parameter maps to Privileged
in the Create a container section
of the Docker Remote API and the
--privileged
option to docker run. This parameter is not supported for Windows containers or tasks run on Fargate.
public Boolean getPrivileged()
When this parameter is true
, the container is given elevated privileges on the host container
instance (similar to the root
user). This parameter maps to Privileged
in the Create a container section of the
Docker Remote API and the --privileged
option to docker run.
This parameter is not supported for Windows containers or tasks run on Fargate.
true
, the container is given elevated privileges on the host
container instance (similar to the root
user). This parameter maps to
Privileged
in the Create a container section
of the Docker Remote API and the
--privileged
option to docker run. This parameter is not supported for Windows containers or tasks run on Fargate.
public TaskContainerDetails withPrivileged(Boolean privileged)
When this parameter is true
, the container is given elevated privileges on the host container
instance (similar to the root
user). This parameter maps to Privileged
in the Create a container section of the
Docker Remote API and the --privileged
option to docker run.
This parameter is not supported for Windows containers or tasks run on Fargate.
privileged
- When this parameter is true
, the container is given elevated privileges on the host container
instance (similar to the root
user). This parameter maps to Privileged
in the Create a container section
of the Docker Remote API and the
--privileged
option to docker run. This parameter is not supported for Windows containers or tasks run on Fargate.
public Boolean isPrivileged()
When this parameter is true
, the container is given elevated privileges on the host container
instance (similar to the root
user). This parameter maps to Privileged
in the Create a container section of the
Docker Remote API and the --privileged
option to docker run.
This parameter is not supported for Windows containers or tasks run on Fargate.
true
, the container is given elevated privileges on the host
container instance (similar to the root
user). This parameter maps to
Privileged
in the Create a container section
of the Docker Remote API and the
--privileged
option to docker run. This parameter is not supported for Windows containers or tasks run on Fargate.
public void setReadonlyRootFilesystem(Boolean readonlyRootFilesystem)
When this parameter is true, the container is given read-only access to its root file system. This parameter maps
to ReadonlyRootfs
in the Create a container section of the
Docker Remote API and the --read-only
option
to docker run.
This parameter is not supported for Windows containers.
readonlyRootFilesystem
- When this parameter is true, the container is given read-only access to its root file system. This
parameter maps to ReadonlyRootfs
in the Create a container section
of the Docker Remote API and the
--read-only
option to docker run. This parameter is not supported for Windows containers.
public Boolean getReadonlyRootFilesystem()
When this parameter is true, the container is given read-only access to its root file system. This parameter maps
to ReadonlyRootfs
in the Create a container section of the
Docker Remote API and the --read-only
option
to docker run.
This parameter is not supported for Windows containers.
ReadonlyRootfs
in the Create a container section
of the Docker Remote API and the
--read-only
option to docker run. This parameter is not supported for Windows containers.
public TaskContainerDetails withReadonlyRootFilesystem(Boolean readonlyRootFilesystem)
When this parameter is true, the container is given read-only access to its root file system. This parameter maps
to ReadonlyRootfs
in the Create a container section of the
Docker Remote API and the --read-only
option
to docker run.
This parameter is not supported for Windows containers.
readonlyRootFilesystem
- When this parameter is true, the container is given read-only access to its root file system. This
parameter maps to ReadonlyRootfs
in the Create a container section
of the Docker Remote API and the
--read-only
option to docker run. This parameter is not supported for Windows containers.
public Boolean isReadonlyRootFilesystem()
When this parameter is true, the container is given read-only access to its root file system. This parameter maps
to ReadonlyRootfs
in the Create a container section of the
Docker Remote API and the --read-only
option
to docker run.
This parameter is not supported for Windows containers.
ReadonlyRootfs
in the Create a container section
of the Docker Remote API and the
--read-only
option to docker run. This parameter is not supported for Windows containers.
public void setRepositoryCredentials(RepositoryCredentials repositoryCredentials)
The private repository authentication credentials to use.
repositoryCredentials
- The private repository authentication credentials to use.public RepositoryCredentials getRepositoryCredentials()
The private repository authentication credentials to use.
public TaskContainerDetails withRepositoryCredentials(RepositoryCredentials repositoryCredentials)
The private repository authentication credentials to use.
repositoryCredentials
- The private repository authentication credentials to use.public List<ResourceRequirement> getResourceRequirements()
The type and amount of a resource to assign to a container. The only supported resource is a GPU.
public void setResourceRequirements(Collection<ResourceRequirement> resourceRequirements)
The type and amount of a resource to assign to a container. The only supported resource is a GPU.
resourceRequirements
- The type and amount of a resource to assign to a container. The only supported resource is a GPU.public TaskContainerDetails withResourceRequirements(ResourceRequirement... resourceRequirements)
The type and amount of a resource to assign to a container. The only supported resource is a GPU.
NOTE: This method appends the values to the existing list (if any). Use
setResourceRequirements(java.util.Collection)
or withResourceRequirements(java.util.Collection)
if you want to override the existing values.
resourceRequirements
- The type and amount of a resource to assign to a container. The only supported resource is a GPU.public TaskContainerDetails withResourceRequirements(Collection<ResourceRequirement> resourceRequirements)
The type and amount of a resource to assign to a container. The only supported resource is a GPU.
resourceRequirements
- The type and amount of a resource to assign to a container. The only supported resource is a GPU.public List<Secret> getSecrets()
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
public void setSecrets(Collection<Secret> secrets)
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
secrets
- The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.public TaskContainerDetails withSecrets(Secret... secrets)
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
NOTE: This method appends the values to the existing list (if any). Use
setSecrets(java.util.Collection)
or withSecrets(java.util.Collection)
if you want to override
the existing values.
secrets
- The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.public TaskContainerDetails withSecrets(Collection<Secret> secrets)
The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.
secrets
- The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide.public List<Ulimit> getUlimits()
A list of ulimits
to set in the container. If a ulimit
value is specified in a task
definition, it overrides the default values set by Docker. This parameter maps to Ulimits
in the Create a container section of the
Docker Remote API and the --ulimit
option to
docker run.
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the
exception of the nofile resource limit parameter which Fargate overrides. The nofile
resource limit
sets a restriction on the number of open files that a container can use. The default nofile
soft
limit is 1024
and the default hard limit is 65535
.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the
Docker Remote API version on your container instance, log in to your container instance and run the following
command: sudo docker version --format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
ulimits
to set in the container. If a ulimit
value is specified in a
task definition, it overrides the default values set by Docker. This parameter maps to
Ulimits
in the Create a container section
of the Docker Remote API and the
--ulimit
option to docker run.
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with
the exception of the nofile resource limit parameter which Fargate overrides. The nofile
resource limit sets a restriction on the number of open files that a container can use. The default
nofile
soft limit is 1024
and the default hard limit is 65535
.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To
check the Docker Remote API version on your container instance, log in to your container instance and run
the following command: sudo docker version --format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
public void setUlimits(Collection<Ulimit> ulimits)
A list of ulimits
to set in the container. If a ulimit
value is specified in a task
definition, it overrides the default values set by Docker. This parameter maps to Ulimits
in the Create a container section of the
Docker Remote API and the --ulimit
option to
docker run.
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the
exception of the nofile resource limit parameter which Fargate overrides. The nofile
resource limit
sets a restriction on the number of open files that a container can use. The default nofile
soft
limit is 1024
and the default hard limit is 65535
.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the
Docker Remote API version on your container instance, log in to your container instance and run the following
command: sudo docker version --format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
ulimits
- A list of ulimits
to set in the container. If a ulimit
value is specified in a
task definition, it overrides the default values set by Docker. This parameter maps to
Ulimits
in the Create a container section
of the Docker Remote API and the
--ulimit
option to docker run.
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with
the exception of the nofile resource limit parameter which Fargate overrides. The nofile
resource limit sets a restriction on the number of open files that a container can use. The default
nofile
soft limit is 1024
and the default hard limit is 65535
.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To
check the Docker Remote API version on your container instance, log in to your container instance and run
the following command: sudo docker version --format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
public TaskContainerDetails withUlimits(Ulimit... ulimits)
A list of ulimits
to set in the container. If a ulimit
value is specified in a task
definition, it overrides the default values set by Docker. This parameter maps to Ulimits
in the Create a container section of the
Docker Remote API and the --ulimit
option to
docker run.
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the
exception of the nofile resource limit parameter which Fargate overrides. The nofile
resource limit
sets a restriction on the number of open files that a container can use. The default nofile
soft
limit is 1024
and the default hard limit is 65535
.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the
Docker Remote API version on your container instance, log in to your container instance and run the following
command: sudo docker version --format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
NOTE: This method appends the values to the existing list (if any). Use
setUlimits(java.util.Collection)
or withUlimits(java.util.Collection)
if you want to override
the existing values.
ulimits
- A list of ulimits
to set in the container. If a ulimit
value is specified in a
task definition, it overrides the default values set by Docker. This parameter maps to
Ulimits
in the Create a container section
of the Docker Remote API and the
--ulimit
option to docker run.
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with
the exception of the nofile resource limit parameter which Fargate overrides. The nofile
resource limit sets a restriction on the number of open files that a container can use. The default
nofile
soft limit is 1024
and the default hard limit is 65535
.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To
check the Docker Remote API version on your container instance, log in to your container instance and run
the following command: sudo docker version --format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
public TaskContainerDetails withUlimits(Collection<Ulimit> ulimits)
A list of ulimits
to set in the container. If a ulimit
value is specified in a task
definition, it overrides the default values set by Docker. This parameter maps to Ulimits
in the Create a container section of the
Docker Remote API and the --ulimit
option to
docker run.
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the
exception of the nofile resource limit parameter which Fargate overrides. The nofile
resource limit
sets a restriction on the number of open files that a container can use. The default nofile
soft
limit is 1024
and the default hard limit is 65535
.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the
Docker Remote API version on your container instance, log in to your container instance and run the following
command: sudo docker version --format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
ulimits
- A list of ulimits
to set in the container. If a ulimit
value is specified in a
task definition, it overrides the default values set by Docker. This parameter maps to
Ulimits
in the Create a container section
of the Docker Remote API and the
--ulimit
option to docker run.
Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with
the exception of the nofile resource limit parameter which Fargate overrides. The nofile
resource limit sets a restriction on the number of open files that a container can use. The default
nofile
soft limit is 1024
and the default hard limit is 65535
.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To
check the Docker Remote API version on your container instance, log in to your container instance and run
the following command: sudo docker version --format '{{.Server.APIVersion}}'
This parameter is not supported for Windows containers.
public void setUser(String user)
The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run.
When running tasks using the host
network mode, don't run containers using the
root user (UID 0)
. We recommend using a non-root user for better security.
You can specify the user
using the following formats. If specifying a UID or GID, you must specify
it as a positive integer.
user
user:group
uid
uid:gid
user:gi
uid:group
This parameter is not supported for Windows containers.
user
- The user to use inside the container. This parameter maps to User in the Create a container section of the
Docker Remote API and the --user option to docker run.
When running tasks using the host
network mode, don't run containers using the
root user (UID 0)
. We recommend using a non-root user for better security.
You can specify the user
using the following formats. If specifying a UID or GID, you must
specify it as a positive integer.
user
user:group
uid
uid:gid
user:gi
uid:group
This parameter is not supported for Windows containers.
public String getUser()
The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run.
When running tasks using the host
network mode, don't run containers using the
root user (UID 0)
. We recommend using a non-root user for better security.
You can specify the user
using the following formats. If specifying a UID or GID, you must specify
it as a positive integer.
user
user:group
uid
uid:gid
user:gi
uid:group
This parameter is not supported for Windows containers.
When running tasks using the host
network mode, don't run containers using the
root user (UID 0)
. We recommend using a non-root user for better security.
You can specify the user
using the following formats. If specifying a UID or GID, you must
specify it as a positive integer.
user
user:group
uid
uid:gid
user:gi
uid:group
This parameter is not supported for Windows containers.
public TaskContainerDetails withUser(String user)
The user to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run.
When running tasks using the host
network mode, don't run containers using the
root user (UID 0)
. We recommend using a non-root user for better security.
You can specify the user
using the following formats. If specifying a UID or GID, you must specify
it as a positive integer.
user
user:group
uid
uid:gid
user:gi
uid:group
This parameter is not supported for Windows containers.
user
- The user to use inside the container. This parameter maps to User in the Create a container section of the
Docker Remote API and the --user option to docker run.
When running tasks using the host
network mode, don't run containers using the
root user (UID 0)
. We recommend using a non-root user for better security.
You can specify the user
using the following formats. If specifying a UID or GID, you must
specify it as a positive integer.
user
user:group
uid
uid:gid
user:gi
uid:group
This parameter is not supported for Windows containers.
public void setExitCode(Integer exitCode)
The exit code returned upon completion.
exitCode
- The exit code returned upon completion.public Integer getExitCode()
The exit code returned upon completion.
public TaskContainerDetails withExitCode(Integer exitCode)
The exit code returned upon completion.
exitCode
- The exit code returned upon completion.public void setReason(String reason)
A short (255 max characters) human-readable string to provide additional details for a running or stopped container.
reason
- A short (255 max characters) human-readable string to provide additional details for a running or stopped
container.public String getReason()
A short (255 max characters) human-readable string to provide additional details for a running or stopped container.
public TaskContainerDetails withReason(String reason)
A short (255 max characters) human-readable string to provide additional details for a running or stopped container.
reason
- A short (255 max characters) human-readable string to provide additional details for a running or stopped
container.public void setLogStreamName(String logStreamName)
The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is
/aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING
status.
logStreamName
- The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch
jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the
RUNNING
status.public String getLogStreamName()
The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is
/aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING
status.
RUNNING
status.public TaskContainerDetails withLogStreamName(String logStreamName)
The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch jobs is
/aws/batch/job. Each container attempt receives a log stream name when they reach the RUNNING
status.
logStreamName
- The name of the CloudWatch Logs log stream that's associated with the container. The log group for Batch
jobs is /aws/batch/job. Each container attempt receives a log stream name when they reach the
RUNNING
status.public List<NetworkInterface> getNetworkInterfaces()
The network interfaces that are associated with the job.
public void setNetworkInterfaces(Collection<NetworkInterface> networkInterfaces)
The network interfaces that are associated with the job.
networkInterfaces
- The network interfaces that are associated with the job.public TaskContainerDetails withNetworkInterfaces(NetworkInterface... networkInterfaces)
The network interfaces that are associated with the job.
NOTE: This method appends the values to the existing list (if any). Use
setNetworkInterfaces(java.util.Collection)
or withNetworkInterfaces(java.util.Collection)
if
you want to override the existing values.
networkInterfaces
- The network interfaces that are associated with the job.public TaskContainerDetails withNetworkInterfaces(Collection<NetworkInterface> networkInterfaces)
The network interfaces that are associated with the job.
networkInterfaces
- The network interfaces that are associated with the job.public String toString()
toString
in class Object
Object.toString()
public TaskContainerDetails clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.