Class ContainerOverride
- java.lang.Object
-
- com.amazonaws.services.ecs.model.ContainerOverride
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ContainerOverride extends Object implements Serializable, Cloneable
The overrides that should be sent to a container.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContainerOverride()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerOverride
clone()
boolean
equals(Object obj)
List<String>
getCommand()
The command to send to the container that overrides the default command from the Docker image or the task definition.List<KeyValuePair>
getEnvironment()
The environment variables to send to the container.String
getName()
The name of the container that receives the override.int
hashCode()
void
setCommand(Collection<String> command)
The command to send to the container that overrides the default command from the Docker image or the task definition.void
setEnvironment(Collection<KeyValuePair> environment)
The environment variables to send to the container.void
setName(String name)
The name of the container that receives the override.String
toString()
Returns a string representation of this object; useful for testing and debugging.ContainerOverride
withCommand(String... command)
The command to send to the container that overrides the default command from the Docker image or the task definition.ContainerOverride
withCommand(Collection<String> command)
The command to send to the container that overrides the default command from the Docker image or the task definition.ContainerOverride
withEnvironment(KeyValuePair... environment)
The environment variables to send to the container.ContainerOverride
withEnvironment(Collection<KeyValuePair> environment)
The environment variables to send to the container.ContainerOverride
withName(String name)
The name of the container that receives the override.
-
-
-
Method Detail
-
setName
public void setName(String name)
The name of the container that receives the override.
- Parameters:
name
- The name of the container that receives the override.
-
getName
public String getName()
The name of the container that receives the override.
- Returns:
- The name of the container that receives the override.
-
withName
public ContainerOverride withName(String name)
The name of the container that receives the override.
- Parameters:
name
- The name of the container that receives the override.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getCommand
public List<String> getCommand()
The command to send to the container that overrides the default command from the Docker image or the task definition.
- Returns:
- The command to send to the container that overrides the default command from the Docker image or the task definition.
-
setCommand
public void setCommand(Collection<String> command)
The command to send to the container that overrides the default command from the Docker image or the task definition.
- Parameters:
command
- The command to send to the container that overrides the default command from the Docker image or the task definition.
-
withCommand
public ContainerOverride withCommand(String... command)
The command to send to the container that overrides the default command from the Docker image or the task definition.
NOTE: This method appends the values to the existing list (if any). Use
setCommand(java.util.Collection)
orwithCommand(java.util.Collection)
if you want to override the existing values.- Parameters:
command
- The command to send to the container that overrides the default command from the Docker image or the task definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withCommand
public ContainerOverride withCommand(Collection<String> command)
The command to send to the container that overrides the default command from the Docker image or the task definition.
- Parameters:
command
- The command to send to the container that overrides the default command from the Docker image or the task definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getEnvironment
public List<KeyValuePair> getEnvironment()
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.
- Returns:
- The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.
-
setEnvironment
public void setEnvironment(Collection<KeyValuePair> environment)
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.
- Parameters:
environment
- The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.
-
withEnvironment
public ContainerOverride withEnvironment(KeyValuePair... environment)
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.
NOTE: This method appends the values to the existing list (if any). Use
setEnvironment(java.util.Collection)
orwithEnvironment(java.util.Collection)
if you want to override the existing values.- Parameters:
environment
- The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withEnvironment
public ContainerOverride withEnvironment(Collection<KeyValuePair> environment)
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.
- Parameters:
environment
- The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public ContainerOverride clone()
-
-