public class Task
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Details on a task in a cluster.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
clusterArn
The Amazon Resource Name (ARN) of the cluster that hosts the task.
|
private java.lang.String |
containerInstanceArn
The Amazon Resource Name (ARN) of the container instances that host the
task.
|
private SdkInternalList<Container> |
containers
The containers associated with the task.
|
private java.util.Date |
createdAt
The Unix time in seconds and milliseconds when the task was created (the
task entered the
PENDING state). |
private java.lang.String |
desiredStatus
The desired status of the task.
|
private java.lang.String |
lastStatus
The last known status of the task.
|
private TaskOverride |
overrides
One or more container overrides.
|
private java.util.Date |
startedAt
The Unix time in seconds and milliseconds when the task was started (the
task transitioned from the
PENDING state to the
RUNNING state). |
private java.lang.String |
startedBy
The tag specified when a task is started.
|
private java.util.Date |
stoppedAt
The Unix time in seconds and milliseconds when the task was stopped (the
task transitioned from the
RUNNING state to the
STOPPED state). |
private java.lang.String |
stoppedReason
The reason the task was stopped.
|
private java.lang.String |
taskArn
The Amazon Resource Name (ARN) of the task.
|
private java.lang.String |
taskDefinitionArn
The Amazon Resource Name (ARN) of the task definition that creates the
task.
|
Constructor and Description |
---|
Task() |
Modifier and Type | Method and Description |
---|---|
Task |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getClusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the task.
|
java.lang.String |
getContainerInstanceArn()
The Amazon Resource Name (ARN) of the container instances that host the
task.
|
java.util.List<Container> |
getContainers()
The containers associated with the task.
|
java.util.Date |
getCreatedAt()
The Unix time in seconds and milliseconds when the task was created (the
task entered the
PENDING state). |
java.lang.String |
getDesiredStatus()
The desired status of the task.
|
java.lang.String |
getLastStatus()
The last known status of the task.
|
TaskOverride |
getOverrides()
One or more container overrides.
|
java.util.Date |
getStartedAt()
The Unix time in seconds and milliseconds when the task was started (the
task transitioned from the
PENDING state to the
RUNNING state). |
java.lang.String |
getStartedBy()
The tag specified when a task is started.
|
java.util.Date |
getStoppedAt()
The Unix time in seconds and milliseconds when the task was stopped (the
task transitioned from the
RUNNING state to the
STOPPED state). |
java.lang.String |
getStoppedReason()
The reason the task was stopped.
|
java.lang.String |
getTaskArn()
The Amazon Resource Name (ARN) of the task.
|
java.lang.String |
getTaskDefinitionArn()
The Amazon Resource Name (ARN) of the task definition that creates the
task.
|
int |
hashCode() |
void |
setClusterArn(java.lang.String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the task.
|
void |
setContainerInstanceArn(java.lang.String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instances that host the
task.
|
void |
setContainers(java.util.Collection<Container> containers)
The containers associated with the task.
|
void |
setCreatedAt(java.util.Date createdAt)
The Unix time in seconds and milliseconds when the task was created (the
task entered the
PENDING state). |
void |
setDesiredStatus(java.lang.String desiredStatus)
The desired status of the task.
|
void |
setLastStatus(java.lang.String lastStatus)
The last known status of the task.
|
void |
setOverrides(TaskOverride overrides)
One or more container overrides.
|
void |
setStartedAt(java.util.Date startedAt)
The Unix time in seconds and milliseconds when the task was started (the
task transitioned from the
PENDING state to the
RUNNING state). |
void |
setStartedBy(java.lang.String startedBy)
The tag specified when a task is started.
|
void |
setStoppedAt(java.util.Date stoppedAt)
The Unix time in seconds and milliseconds when the task was stopped (the
task transitioned from the
RUNNING state to the
STOPPED state). |
void |
setStoppedReason(java.lang.String stoppedReason)
The reason the task was stopped.
|
void |
setTaskArn(java.lang.String taskArn)
The Amazon Resource Name (ARN) of the task.
|
void |
setTaskDefinitionArn(java.lang.String taskDefinitionArn)
The Amazon Resource Name (ARN) of the task definition that creates the
task.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Task |
withClusterArn(java.lang.String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the task.
|
Task |
withContainerInstanceArn(java.lang.String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instances that host the
task.
|
Task |
withContainers(java.util.Collection<Container> containers)
The containers associated with the task.
|
Task |
withContainers(Container... containers)
The containers associated with the task.
|
Task |
withCreatedAt(java.util.Date createdAt)
The Unix time in seconds and milliseconds when the task was created (the
task entered the
PENDING state). |
Task |
withDesiredStatus(java.lang.String desiredStatus)
The desired status of the task.
|
Task |
withLastStatus(java.lang.String lastStatus)
The last known status of the task.
|
Task |
withOverrides(TaskOverride overrides)
One or more container overrides.
|
Task |
withStartedAt(java.util.Date startedAt)
The Unix time in seconds and milliseconds when the task was started (the
task transitioned from the
PENDING state to the
RUNNING state). |
Task |
withStartedBy(java.lang.String startedBy)
The tag specified when a task is started.
|
Task |
withStoppedAt(java.util.Date stoppedAt)
The Unix time in seconds and milliseconds when the task was stopped (the
task transitioned from the
RUNNING state to the
STOPPED state). |
Task |
withStoppedReason(java.lang.String stoppedReason)
The reason the task was stopped.
|
Task |
withTaskArn(java.lang.String taskArn)
The Amazon Resource Name (ARN) of the task.
|
Task |
withTaskDefinitionArn(java.lang.String taskDefinitionArn)
The Amazon Resource Name (ARN) of the task definition that creates the
task.
|
private java.lang.String taskArn
The Amazon Resource Name (ARN) of the task.
private java.lang.String clusterArn
The Amazon Resource Name (ARN) of the cluster that hosts the task.
private java.lang.String taskDefinitionArn
The Amazon Resource Name (ARN) of the task definition that creates the task.
private java.lang.String containerInstanceArn
The Amazon Resource Name (ARN) of the container instances that host the task.
private TaskOverride overrides
One or more container overrides.
private java.lang.String lastStatus
The last known status of the task.
private java.lang.String desiredStatus
The desired status of the task.
private SdkInternalList<Container> containers
The containers associated with the task.
private java.lang.String startedBy
The tag specified when a task is started. If the task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
private java.lang.String stoppedReason
The reason the task was stopped.
private java.util.Date createdAt
The Unix time in seconds and milliseconds when the task was created (the
task entered the PENDING
state).
private java.util.Date startedAt
The Unix time in seconds and milliseconds when the task was started (the
task transitioned from the PENDING
state to the
RUNNING
state).
private java.util.Date stoppedAt
The Unix time in seconds and milliseconds when the task was stopped (the
task transitioned from the RUNNING
state to the
STOPPED
state).
public void setTaskArn(java.lang.String taskArn)
The Amazon Resource Name (ARN) of the task.
taskArn
- The Amazon Resource Name (ARN) of the task.public java.lang.String getTaskArn()
The Amazon Resource Name (ARN) of the task.
public Task withTaskArn(java.lang.String taskArn)
The Amazon Resource Name (ARN) of the task.
taskArn
- The Amazon Resource Name (ARN) of the task.public void setClusterArn(java.lang.String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the task.
clusterArn
- The Amazon Resource Name (ARN) of the cluster that hosts the task.public java.lang.String getClusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the task.
public Task withClusterArn(java.lang.String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the task.
clusterArn
- The Amazon Resource Name (ARN) of the cluster that hosts the task.public void setTaskDefinitionArn(java.lang.String taskDefinitionArn)
The Amazon Resource Name (ARN) of the task definition that creates the task.
taskDefinitionArn
- The Amazon Resource Name (ARN) of the task definition that creates
the task.public java.lang.String getTaskDefinitionArn()
The Amazon Resource Name (ARN) of the task definition that creates the task.
public Task withTaskDefinitionArn(java.lang.String taskDefinitionArn)
The Amazon Resource Name (ARN) of the task definition that creates the task.
taskDefinitionArn
- The Amazon Resource Name (ARN) of the task definition that creates
the task.public void setContainerInstanceArn(java.lang.String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instances that host the task.
containerInstanceArn
- The Amazon Resource Name (ARN) of the container instances that
host the task.public java.lang.String getContainerInstanceArn()
The Amazon Resource Name (ARN) of the container instances that host the task.
public Task withContainerInstanceArn(java.lang.String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instances that host the task.
containerInstanceArn
- The Amazon Resource Name (ARN) of the container instances that
host the task.public void setOverrides(TaskOverride overrides)
One or more container overrides.
overrides
- One or more container overrides.public TaskOverride getOverrides()
One or more container overrides.
public Task withOverrides(TaskOverride overrides)
One or more container overrides.
overrides
- One or more container overrides.public void setLastStatus(java.lang.String lastStatus)
The last known status of the task.
lastStatus
- The last known status of the task.public java.lang.String getLastStatus()
The last known status of the task.
public Task withLastStatus(java.lang.String lastStatus)
The last known status of the task.
lastStatus
- The last known status of the task.public void setDesiredStatus(java.lang.String desiredStatus)
The desired status of the task.
desiredStatus
- The desired status of the task.public java.lang.String getDesiredStatus()
The desired status of the task.
public Task withDesiredStatus(java.lang.String desiredStatus)
The desired status of the task.
desiredStatus
- The desired status of the task.public java.util.List<Container> getContainers()
The containers associated with the task.
public void setContainers(java.util.Collection<Container> containers)
The containers associated with the task.
containers
- The containers associated with the task.public Task withContainers(Container... containers)
The containers associated with the task.
NOTE: This method appends the values to the existing list (if
any). Use setContainers(java.util.Collection)
or
withContainers(java.util.Collection)
if you want to override the
existing values.
containers
- The containers associated with the task.public Task withContainers(java.util.Collection<Container> containers)
The containers associated with the task.
containers
- The containers associated with the task.public void setStartedBy(java.lang.String startedBy)
The tag specified when a task is started. If the task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
startedBy
- The tag specified when a task is started. If the task is started
by an Amazon ECS service, then the startedBy
parameter contains the deployment ID of the service that starts
it.public java.lang.String getStartedBy()
The tag specified when a task is started. If the task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
startedBy
parameter contains the deployment ID of the service that starts
it.public Task withStartedBy(java.lang.String startedBy)
The tag specified when a task is started. If the task is started by an
Amazon ECS service, then the startedBy
parameter contains
the deployment ID of the service that starts it.
startedBy
- The tag specified when a task is started. If the task is started
by an Amazon ECS service, then the startedBy
parameter contains the deployment ID of the service that starts
it.public void setStoppedReason(java.lang.String stoppedReason)
The reason the task was stopped.
stoppedReason
- The reason the task was stopped.public java.lang.String getStoppedReason()
The reason the task was stopped.
public Task withStoppedReason(java.lang.String stoppedReason)
The reason the task was stopped.
stoppedReason
- The reason the task was stopped.public void setCreatedAt(java.util.Date createdAt)
The Unix time in seconds and milliseconds when the task was created (the
task entered the PENDING
state).
createdAt
- The Unix time in seconds and milliseconds when the task was
created (the task entered the PENDING
state).public java.util.Date getCreatedAt()
The Unix time in seconds and milliseconds when the task was created (the
task entered the PENDING
state).
PENDING
state).public Task withCreatedAt(java.util.Date createdAt)
The Unix time in seconds and milliseconds when the task was created (the
task entered the PENDING
state).
createdAt
- The Unix time in seconds and milliseconds when the task was
created (the task entered the PENDING
state).public void setStartedAt(java.util.Date startedAt)
The Unix time in seconds and milliseconds when the task was started (the
task transitioned from the PENDING
state to the
RUNNING
state).
startedAt
- The Unix time in seconds and milliseconds when the task was
started (the task transitioned from the PENDING
state
to the RUNNING
state).public java.util.Date getStartedAt()
The Unix time in seconds and milliseconds when the task was started (the
task transitioned from the PENDING
state to the
RUNNING
state).
PENDING
state to the RUNNING
state).public Task withStartedAt(java.util.Date startedAt)
The Unix time in seconds and milliseconds when the task was started (the
task transitioned from the PENDING
state to the
RUNNING
state).
startedAt
- The Unix time in seconds and milliseconds when the task was
started (the task transitioned from the PENDING
state
to the RUNNING
state).public void setStoppedAt(java.util.Date stoppedAt)
The Unix time in seconds and milliseconds when the task was stopped (the
task transitioned from the RUNNING
state to the
STOPPED
state).
stoppedAt
- The Unix time in seconds and milliseconds when the task was
stopped (the task transitioned from the RUNNING
state
to the STOPPED
state).public java.util.Date getStoppedAt()
The Unix time in seconds and milliseconds when the task was stopped (the
task transitioned from the RUNNING
state to the
STOPPED
state).
RUNNING
state to the STOPPED
state).public Task withStoppedAt(java.util.Date stoppedAt)
The Unix time in seconds and milliseconds when the task was stopped (the
task transitioned from the RUNNING
state to the
STOPPED
state).
stoppedAt
- The Unix time in seconds and milliseconds when the task was
stopped (the task transitioned from the RUNNING
state
to the STOPPED
state).public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Task clone()
clone
in class java.lang.Object