public class ContainerDefinition extends Object implements Serializable, Cloneable
Container definitions are used in task definitions to describe the different containers that are launched as part of a task.
Constructor and Description |
---|
ContainerDefinition() |
Modifier and Type | Method and Description |
---|---|
ContainerDefinition |
clone() |
boolean |
equals(Object obj) |
List<String> |
getCommand()
The
CMD that is passed to the container. |
Integer |
getCpu()
The number of
cpu units reserved for the container. |
List<String> |
getEntryPoint()
|
List<KeyValuePair> |
getEnvironment()
The environment variables to pass to a container.
|
Boolean |
getEssential()
If the
essential parameter of a container is marked as
true , the failure of that container will stop the task. |
String |
getImage()
The image used to start a container.
|
List<String> |
getLinks()
The
link parameter allows containers to communicate with
each other without the need for port mappings, using the
name parameter. |
Integer |
getMemory()
The number of MiB of memory reserved for the container.
|
List<MountPoint> |
getMountPoints()
The mount points for data volumes in your container.
|
String |
getName()
The name of a container.
|
List<PortMapping> |
getPortMappings()
The list of port mappings for the container.
|
List<VolumeFrom> |
getVolumesFrom()
Data volumes to mount from another container.
|
int |
hashCode() |
Boolean |
isEssential()
If the
essential parameter of a container is marked as
true , the failure of that container will stop the task. |
void |
setCommand(Collection<String> command)
The
CMD that is passed to the container. |
void |
setCpu(Integer cpu)
The number of
cpu units reserved for the container. |
void |
setEntryPoint(Collection<String> entryPoint)
|
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 , the failure of that container will stop the task. |
void |
setImage(String image)
The image used to start a container.
|
void |
setLinks(Collection<String> links)
The
link parameter allows containers to communicate with
each other without the need for port mappings, using the
name parameter. |
void |
setMemory(Integer memory)
The number of MiB of memory reserved for 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 |
setPortMappings(Collection<PortMapping> portMappings)
The list of port mappings for the container.
|
void |
setVolumesFrom(Collection<VolumeFrom> volumesFrom)
Data volumes to mount from another container.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ContainerDefinition |
withCommand(Collection<String> command)
The
CMD that is passed to the container. |
ContainerDefinition |
withCommand(String... command)
The
CMD that is passed to the container. |
ContainerDefinition |
withCpu(Integer cpu)
The number of
cpu units reserved for the container. |
ContainerDefinition |
withEntryPoint(Collection<String> entryPoint)
|
ContainerDefinition |
withEntryPoint(String... entryPoint)
|
ContainerDefinition |
withEnvironment(Collection<KeyValuePair> environment)
The environment variables to pass to a container.
|
ContainerDefinition |
withEnvironment(KeyValuePair... environment)
The environment variables to pass to a container.
|
ContainerDefinition |
withEssential(Boolean essential)
If the
essential parameter of a container is marked as
true , the failure of that container will stop the task. |
ContainerDefinition |
withImage(String image)
The image used to start a container.
|
ContainerDefinition |
withLinks(Collection<String> links)
The
link parameter allows containers to communicate with
each other without the need for port mappings, using the
name parameter. |
ContainerDefinition |
withLinks(String... links)
The
link parameter allows containers to communicate with
each other without the need for port mappings, using the
name parameter. |
ContainerDefinition |
withMemory(Integer memory)
The number of MiB of memory reserved for the container.
|
ContainerDefinition |
withMountPoints(Collection<MountPoint> mountPoints)
The mount points for data volumes in your container.
|
ContainerDefinition |
withMountPoints(MountPoint... mountPoints)
The mount points for data volumes in your container.
|
ContainerDefinition |
withName(String name)
The name of a container.
|
ContainerDefinition |
withPortMappings(Collection<PortMapping> portMappings)
The list of port mappings for the container.
|
ContainerDefinition |
withPortMappings(PortMapping... portMappings)
The list of port mappings for the container.
|
ContainerDefinition |
withVolumesFrom(Collection<VolumeFrom> volumesFrom)
Data volumes to mount from another container.
|
ContainerDefinition |
withVolumesFrom(VolumeFrom... volumesFrom)
Data volumes to mount from another container.
|
public String getName()
name
of one container
can be entered in the links
of another container to
connect the containers.name
of one container
can be entered in the links
of another container to
connect the containers.public void setName(String name)
name
of one container
can be entered in the links
of another container to
connect the containers.name
- The name of a container. If you are linking multiple containers
together in a task definition, the name
of one container
can be entered in the links
of another container to
connect the containers.public ContainerDefinition withName(String name)
name
of one container
can be entered in the links
of another container to
connect the containers.
Returns a reference to this object so that method calls can be chained together.
name
- The name of a container. If you are linking multiple containers
together in a task definition, the name
of one container
can be entered in the links
of another container to
connect the containers.public String getImage()
repository-url/image:tag
.repository-url/image:tag
.public void setImage(String image)
repository-url/image:tag
.image
- The image used to start a container. This string is passed directly to
the Docker daemon. Images in the Docker Hub registry are available by
default. Other repositories are specified with
repository-url/image:tag
.public ContainerDefinition withImage(String image)
repository-url/image:tag
.
Returns a reference to this object so that method calls can be chained together.
image
- The image used to start a container. This string is passed directly to
the Docker daemon. Images in the Docker Hub registry are available by
default. Other repositories are specified with
repository-url/image:tag
.public Integer getCpu()
cpu
units reserved for the container. A
container instance has 1,024 cpu
units for every CPU
core. This parameter specifies the minimum amount of CPU to reserve
for a container, and containers share unallocated CPU units with other
containers on the instance with the same ratio as their allocated
amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units.
The Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see CPU share constraint in the Docker documentation. The minimum valid CPU share value that the Linux kernel will allow is 2; however, the CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:
cpu
units reserved for the container. A
container instance has 1,024 cpu
units for every CPU
core. This parameter specifies the minimum amount of CPU to reserve
for a container, and containers share unallocated CPU units with other
containers on the instance with the same ratio as their allocated
amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units.
The Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see CPU share constraint in the Docker documentation. The minimum valid CPU share value that the Linux kernel will allow is 2; however, the CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:
public void setCpu(Integer cpu)
cpu
units reserved for the container. A
container instance has 1,024 cpu
units for every CPU
core. This parameter specifies the minimum amount of CPU to reserve
for a container, and containers share unallocated CPU units with other
containers on the instance with the same ratio as their allocated
amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units.
The Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see CPU share constraint in the Docker documentation. The minimum valid CPU share value that the Linux kernel will allow is 2; however, the CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:
cpu
- The number of cpu
units reserved for the container. A
container instance has 1,024 cpu
units for every CPU
core. This parameter specifies the minimum amount of CPU to reserve
for a container, and containers share unallocated CPU units with other
containers on the instance with the same ratio as their allocated
amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units.
The Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see CPU share constraint in the Docker documentation. The minimum valid CPU share value that the Linux kernel will allow is 2; however, the CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:
public ContainerDefinition withCpu(Integer cpu)
cpu
units reserved for the container. A
container instance has 1,024 cpu
units for every CPU
core. This parameter specifies the minimum amount of CPU to reserve
for a container, and containers share unallocated CPU units with other
containers on the instance with the same ratio as their allocated
amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units.
The Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see CPU share constraint in the Docker documentation. The minimum valid CPU share value that the Linux kernel will allow is 2; however, the CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:
Returns a reference to this object so that method calls can be chained together.
cpu
- The number of cpu
units reserved for the container. A
container instance has 1,024 cpu
units for every CPU
core. This parameter specifies the minimum amount of CPU to reserve
for a container, and containers share unallocated CPU units with other
containers on the instance with the same ratio as their allocated
amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units.
The Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see CPU share constraint in the Docker documentation. The minimum valid CPU share value that the Linux kernel will allow is 2; however, the CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:
public Integer getMemory()
public void setMemory(Integer memory)
memory
- The number of MiB of memory reserved for the container. If your
container attempts to exceed the memory allocated here, the container
is killed.public ContainerDefinition withMemory(Integer memory)
Returns a reference to this object so that method calls can be chained together.
memory
- The number of MiB of memory reserved for the container. If your
container attempts to exceed the memory allocated here, the container
is killed.public List<String> getLinks()
link
parameter allows containers to communicate with
each other without the need for port mappings, using the
name
parameter. The name:internalName
construct is analogous to name:alias
in Docker links. For
more information on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
link
parameter allows containers to communicate with
each other without the need for port mappings, using the
name
parameter. The name:internalName
construct is analogous to name:alias
in Docker links. For
more information on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
public void setLinks(Collection<String> links)
link
parameter allows containers to communicate with
each other without the need for port mappings, using the
name
parameter. The name:internalName
construct is analogous to name:alias
in Docker links. For
more information on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
links
- The link
parameter allows containers to communicate with
each other without the need for port mappings, using the
name
parameter. The name:internalName
construct is analogous to name:alias
in Docker links. For
more information on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
public ContainerDefinition withLinks(String... links)
link
parameter allows containers to communicate with
each other without the need for port mappings, using the
name
parameter. The name:internalName
construct is analogous to name:alias
in Docker links. For
more information on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
NOTE: This method appends the values to the existing list (if
any). Use setLinks(java.util.Collection)
or withLinks(java.util.Collection)
if you want to override the existing
values.
Returns a reference to this object so that method calls can be chained together.
links
- The link
parameter allows containers to communicate with
each other without the need for port mappings, using the
name
parameter. The name:internalName
construct is analogous to name:alias
in Docker links. For
more information on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
public ContainerDefinition withLinks(Collection<String> links)
link
parameter allows containers to communicate with
each other without the need for port mappings, using the
name
parameter. The name:internalName
construct is analogous to name:alias
in Docker links. For
more information on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
Returns a reference to this object so that method calls can be chained together.
links
- The link
parameter allows containers to communicate with
each other without the need for port mappings, using the
name
parameter. The name:internalName
construct is analogous to name:alias
in Docker links. For
more information on linking Docker containers, see https://docs.docker.com/userguide/dockerlinks/.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
public List<PortMapping> getPortMappings()
public void setPortMappings(Collection<PortMapping> portMappings)
portMappings
- The list of port mappings for the container.public ContainerDefinition withPortMappings(PortMapping... portMappings)
NOTE: This method appends the values to the existing list (if
any). Use setPortMappings(java.util.Collection)
or withPortMappings(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
portMappings
- The list of port mappings for the container.public ContainerDefinition withPortMappings(Collection<PortMapping> portMappings)
Returns a reference to this object so that method calls can be chained together.
portMappings
- The list of port mappings for the container.public Boolean isEssential()
essential
parameter of a container is marked as
true
, the failure of that container will stop the task.
If the essential
parameter of a container is marked as
false
, then its failure will not affect the rest of the
containers in a task. If this parameter is omitted, a container is
assumed to be essential. All tasks must have at least one essential container.
essential
parameter of a container is marked as
true
, the failure of that container will stop the task.
If the essential
parameter of a container is marked as
false
, then its failure will not affect the rest of the
containers in a task. If this parameter is omitted, a container is
assumed to be essential. All tasks must have at least one essential container.
public void setEssential(Boolean essential)
essential
parameter of a container is marked as
true
, the failure of that container will stop the task.
If the essential
parameter of a container is marked as
false
, then its failure will not affect the rest of the
containers in a task. If this parameter is omitted, a container is
assumed to be essential. All tasks must have at least one essential container.
essential
- If the essential
parameter of a container is marked as
true
, the failure of that container will stop the task.
If the essential
parameter of a container is marked as
false
, then its failure will not affect the rest of the
containers in a task. If this parameter is omitted, a container is
assumed to be essential. All tasks must have at least one essential container.
public ContainerDefinition withEssential(Boolean essential)
essential
parameter of a container is marked as
true
, the failure of that container will stop the task.
If the essential
parameter of a container is marked as
false
, then its failure will not affect the rest of the
containers in a task. If this parameter is omitted, a container is
assumed to be essential. All tasks must have at least one essential container.
Returns a reference to this object so that method calls can be chained together.
essential
- If the essential
parameter of a container is marked as
true
, the failure of that container will stop the task.
If the essential
parameter of a container is marked as
false
, then its failure will not affect the rest of the
containers in a task. If this parameter is omitted, a container is
assumed to be essential. All tasks must have at least one essential container.
public Boolean getEssential()
essential
parameter of a container is marked as
true
, the failure of that container will stop the task.
If the essential
parameter of a container is marked as
false
, then its failure will not affect the rest of the
containers in a task. If this parameter is omitted, a container is
assumed to be essential. All tasks must have at least one essential container.
essential
parameter of a container is marked as
true
, the failure of that container will stop the task.
If the essential
parameter of a container is marked as
false
, then its failure will not affect the rest of the
containers in a task. If this parameter is omitted, a container is
assumed to be essential. All tasks must have at least one essential container.
public List<String> getEntryPoint()
Early versions of the Amazon ECS container agent do not
properly handle entryPoint
parameters. If you have
problems using entryPoint
, update your container agent or
enter your commands and arguments as command
array items
instead.
The ENTRYPOINT
that is passed to
the container. For more information on the Docker
ENTRYPOINT
parameter, see https://docs.docker.com/reference/builder/#entrypoint.
Early versions of the Amazon ECS container agent do not
properly handle entryPoint
parameters. If you have
problems using entryPoint
, update your container agent or
enter your commands and arguments as command
array items
instead.
The ENTRYPOINT
that is passed to
the container. For more information on the Docker
ENTRYPOINT
parameter, see https://docs.docker.com/reference/builder/#entrypoint.
public void setEntryPoint(Collection<String> entryPoint)
Early versions of the Amazon ECS container agent do not
properly handle entryPoint
parameters. If you have
problems using entryPoint
, update your container agent or
enter your commands and arguments as command
array items
instead.
The ENTRYPOINT
that is passed to
the container. For more information on the Docker
ENTRYPOINT
parameter, see https://docs.docker.com/reference/builder/#entrypoint.
entryPoint
- Early versions of the Amazon ECS container agent do not
properly handle entryPoint
parameters. If you have
problems using entryPoint
, update your container agent or
enter your commands and arguments as command
array items
instead.
The ENTRYPOINT
that is passed to
the container. For more information on the Docker
ENTRYPOINT
parameter, see https://docs.docker.com/reference/builder/#entrypoint.
public ContainerDefinition withEntryPoint(String... entryPoint)
Early versions of the Amazon ECS container agent do not
properly handle entryPoint
parameters. If you have
problems using entryPoint
, update your container agent or
enter your commands and arguments as command
array items
instead.
The ENTRYPOINT
that is passed to
the container. For more information on the Docker
ENTRYPOINT
parameter, see https://docs.docker.com/reference/builder/#entrypoint.
NOTE: This method appends the values to the existing list (if
any). Use setEntryPoint(java.util.Collection)
or withEntryPoint(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
entryPoint
- Early versions of the Amazon ECS container agent do not
properly handle entryPoint
parameters. If you have
problems using entryPoint
, update your container agent or
enter your commands and arguments as command
array items
instead.
The ENTRYPOINT
that is passed to
the container. For more information on the Docker
ENTRYPOINT
parameter, see https://docs.docker.com/reference/builder/#entrypoint.
public ContainerDefinition withEntryPoint(Collection<String> entryPoint)
Early versions of the Amazon ECS container agent do not
properly handle entryPoint
parameters. If you have
problems using entryPoint
, update your container agent or
enter your commands and arguments as command
array items
instead.
The ENTRYPOINT
that is passed to
the container. For more information on the Docker
ENTRYPOINT
parameter, see https://docs.docker.com/reference/builder/#entrypoint.
Returns a reference to this object so that method calls can be chained together.
entryPoint
- Early versions of the Amazon ECS container agent do not
properly handle entryPoint
parameters. If you have
problems using entryPoint
, update your container agent or
enter your commands and arguments as command
array items
instead.
The ENTRYPOINT
that is passed to
the container. For more information on the Docker
ENTRYPOINT
parameter, see https://docs.docker.com/reference/builder/#entrypoint.
public List<String> getCommand()
CMD
that is passed to the container. For more
information on the Docker CMD
parameter, see https://docs.docker.com/reference/builder/#cmd.CMD
that is passed to the container. For more
information on the Docker CMD
parameter, see https://docs.docker.com/reference/builder/#cmd.public void setCommand(Collection<String> command)
CMD
that is passed to the container. For more
information on the Docker CMD
parameter, see https://docs.docker.com/reference/builder/#cmd.command
- The CMD
that is passed to the container. For more
information on the Docker CMD
parameter, see https://docs.docker.com/reference/builder/#cmd.public ContainerDefinition withCommand(String... command)
CMD
that is passed to the container. For more
information on the Docker CMD
parameter, see https://docs.docker.com/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.
Returns a reference to this object so that method calls can be chained together.
command
- The CMD
that is passed to the container. For more
information on the Docker CMD
parameter, see https://docs.docker.com/reference/builder/#cmd.public ContainerDefinition withCommand(Collection<String> command)
CMD
that is passed to the container. For more
information on the Docker CMD
parameter, see https://docs.docker.com/reference/builder/#cmd.
Returns a reference to this object so that method calls can be chained together.
command
- The CMD
that is passed to the container. For more
information on the Docker CMD
parameter, see https://docs.docker.com/reference/builder/#cmd.public List<KeyValuePair> getEnvironment()
public void setEnvironment(Collection<KeyValuePair> environment)
environment
- The environment variables to pass to a container.public ContainerDefinition withEnvironment(KeyValuePair... environment)
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.
Returns a reference to this object so that method calls can be chained together.
environment
- The environment variables to pass to a container.public ContainerDefinition withEnvironment(Collection<KeyValuePair> environment)
Returns a reference to this object so that method calls can be chained together.
environment
- The environment variables to pass to a container.public List<MountPoint> getMountPoints()
public void setMountPoints(Collection<MountPoint> mountPoints)
mountPoints
- The mount points for data volumes in your container.public ContainerDefinition withMountPoints(MountPoint... mountPoints)
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.
Returns a reference to this object so that method calls can be chained together.
mountPoints
- The mount points for data volumes in your container.public ContainerDefinition withMountPoints(Collection<MountPoint> mountPoints)
Returns a reference to this object so that method calls can be chained together.
mountPoints
- The mount points for data volumes in your container.public List<VolumeFrom> getVolumesFrom()
public void setVolumesFrom(Collection<VolumeFrom> volumesFrom)
volumesFrom
- Data volumes to mount from another container.public ContainerDefinition withVolumesFrom(VolumeFrom... volumesFrom)
NOTE: This method appends the values to the existing list (if
any). Use setVolumesFrom(java.util.Collection)
or withVolumesFrom(java.util.Collection)
if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
volumesFrom
- Data volumes to mount from another container.public ContainerDefinition withVolumesFrom(Collection<VolumeFrom> volumesFrom)
Returns a reference to this object so that method calls can be chained together.
volumesFrom
- Data volumes to mount from another container.public String toString()
toString
in class Object
Object.toString()
public ContainerDefinition clone()
Copyright © 2015. All rights reserved.