Class Container

java.lang.Object
com.amazonaws.services.ecs.model.Container
All Implemented Interfaces:
Serializable, Cloneable

public class Container extends Object implements Serializable, Cloneable

A Docker container that is part of a task.

See Also:
  • Constructor Details

    • Container

      public Container()
  • Method Details

    • setContainerArn

      public void setContainerArn(String containerArn)

      The Amazon Resource Name (ARN) of the container.

      Parameters:
      containerArn - The Amazon Resource Name (ARN) of the container.
    • getContainerArn

      public String getContainerArn()

      The Amazon Resource Name (ARN) of the container.

      Returns:
      The Amazon Resource Name (ARN) of the container.
    • withContainerArn

      public Container withContainerArn(String containerArn)

      The Amazon Resource Name (ARN) of the container.

      Parameters:
      containerArn - The Amazon Resource Name (ARN) of the container.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setTaskArn

      public void setTaskArn(String taskArn)

      The Amazon Resource Name (ARN) of the task.

      Parameters:
      taskArn - The Amazon Resource Name (ARN) of the task.
    • getTaskArn

      public String getTaskArn()

      The Amazon Resource Name (ARN) of the task.

      Returns:
      The Amazon Resource Name (ARN) of the task.
    • withTaskArn

      public Container withTaskArn(String taskArn)

      The Amazon Resource Name (ARN) of the task.

      Parameters:
      taskArn - The Amazon Resource Name (ARN) of the task.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setName

      public void setName(String name)

      The name of the container.

      Parameters:
      name - The name of the container.
    • getName

      public String getName()

      The name of the container.

      Returns:
      The name of the container.
    • withName

      public Container withName(String name)

      The name of the container.

      Parameters:
      name - The name of the container.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setLastStatus

      public void setLastStatus(String lastStatus)

      The last known status of the container.

      Parameters:
      lastStatus - The last known status of the container.
    • getLastStatus

      public String getLastStatus()

      The last known status of the container.

      Returns:
      The last known status of the container.
    • withLastStatus

      public Container withLastStatus(String lastStatus)

      The last known status of the container.

      Parameters:
      lastStatus - The last known status of the container.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setExitCode

      public void setExitCode(Integer exitCode)

      The exit code returned from the container.

      Parameters:
      exitCode - The exit code returned from the container.
    • getExitCode

      public Integer getExitCode()

      The exit code returned from the container.

      Returns:
      The exit code returned from the container.
    • withExitCode

      public Container withExitCode(Integer exitCode)

      The exit code returned from the container.

      Parameters:
      exitCode - The exit code returned from the container.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setReason

      public void setReason(String reason)

      A short (255 max characters) human-readable string to provide additional detail about a running or stopped container.

      Parameters:
      reason - A short (255 max characters) human-readable string to provide additional detail about a running or stopped container.
    • getReason

      public String getReason()

      A short (255 max characters) human-readable string to provide additional detail about a running or stopped container.

      Returns:
      A short (255 max characters) human-readable string to provide additional detail about a running or stopped container.
    • withReason

      public Container withReason(String reason)

      A short (255 max characters) human-readable string to provide additional detail about a running or stopped container.

      Parameters:
      reason - A short (255 max characters) human-readable string to provide additional detail about a running or stopped container.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getNetworkBindings

      public List<NetworkBinding> getNetworkBindings()

      The network bindings associated with the container.

      Returns:
      The network bindings associated with the container.
    • setNetworkBindings

      public void setNetworkBindings(Collection<NetworkBinding> networkBindings)

      The network bindings associated with the container.

      Parameters:
      networkBindings - The network bindings associated with the container.
    • withNetworkBindings

      public Container withNetworkBindings(NetworkBinding... networkBindings)

      The network bindings associated with the container.

      NOTE: This method appends the values to the existing list (if any). Use setNetworkBindings(java.util.Collection) or withNetworkBindings(java.util.Collection) if you want to override the existing values.

      Parameters:
      networkBindings - The network bindings associated with the container.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withNetworkBindings

      public Container withNetworkBindings(Collection<NetworkBinding> networkBindings)

      The network bindings associated with the container.

      Parameters:
      networkBindings - The network bindings associated with the container.
      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 class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Container clone()
      Overrides:
      clone in class Object