public class Task extends Object implements Serializable, Cloneable
Details on a task in a cluster.
Constructor and Description |
---|
Task() |
Modifier and Type | Method and Description |
---|---|
Task |
clone() |
boolean |
equals(Object obj) |
String |
getClusterArn()
The Amazon Resource Name (ARN) of the of the cluster that hosts the
task.
|
String |
getContainerInstanceArn()
The Amazon Resource Name (ARN) of the container instances that host
the task.
|
List<Container> |
getContainers()
The containers associated with the task.
|
String |
getDesiredStatus()
The desired status of the task.
|
String |
getLastStatus()
The last known status of the task.
|
TaskOverride |
getOverrides()
One or more container overrides.
|
String |
getStartedBy()
The tag specified when a task is started.
|
String |
getTaskArn()
The Amazon Resource Name (ARN) of the task.
|
String |
getTaskDefinitionArn()
The Amazon Resource Name (ARN) of the of the task definition that
creates the task.
|
int |
hashCode() |
void |
setClusterArn(String clusterArn)
The Amazon Resource Name (ARN) of the of the cluster that hosts the
task.
|
void |
setContainerInstanceArn(String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instances that host
the task.
|
void |
setContainers(Collection<Container> containers)
The containers associated with the task.
|
void |
setDesiredStatus(String desiredStatus)
The desired status of the task.
|
void |
setLastStatus(String lastStatus)
The last known status of the task.
|
void |
setOverrides(TaskOverride overrides)
One or more container overrides.
|
void |
setStartedBy(String startedBy)
The tag specified when a task is started.
|
void |
setTaskArn(String taskArn)
The Amazon Resource Name (ARN) of the task.
|
void |
setTaskDefinitionArn(String taskDefinitionArn)
The Amazon Resource Name (ARN) of the of the task definition that
creates the task.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Task |
withClusterArn(String clusterArn)
The Amazon Resource Name (ARN) of the of the cluster that hosts the
task.
|
Task |
withContainerInstanceArn(String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instances that host
the task.
|
Task |
withContainers(Collection<Container> containers)
The containers associated with the task.
|
Task |
withContainers(Container... containers)
The containers associated with the task.
|
Task |
withDesiredStatus(String desiredStatus)
The desired status of the task.
|
Task |
withLastStatus(String lastStatus)
The last known status of the task.
|
Task |
withOverrides(TaskOverride overrides)
One or more container overrides.
|
Task |
withStartedBy(String startedBy)
The tag specified when a task is started.
|
Task |
withTaskArn(String taskArn)
The Amazon Resource Name (ARN) of the task.
|
Task |
withTaskDefinitionArn(String taskDefinitionArn)
The Amazon Resource Name (ARN) of the of the task definition that
creates the task.
|
public String getTaskArn()
public void setTaskArn(String taskArn)
taskArn
- The Amazon Resource Name (ARN) of the task.public Task withTaskArn(String taskArn)
Returns a reference to this object so that method calls can be chained together.
taskArn
- The Amazon Resource Name (ARN) of the task.public String getClusterArn()
public void setClusterArn(String clusterArn)
clusterArn
- The Amazon Resource Name (ARN) of the of the cluster that hosts the
task.public Task withClusterArn(String clusterArn)
Returns a reference to this object so that method calls can be chained together.
clusterArn
- The Amazon Resource Name (ARN) of the of the cluster that hosts the
task.public String getTaskDefinitionArn()
public void setTaskDefinitionArn(String taskDefinitionArn)
taskDefinitionArn
- The Amazon Resource Name (ARN) of the of the task definition that
creates the task.public Task withTaskDefinitionArn(String taskDefinitionArn)
Returns a reference to this object so that method calls can be chained together.
taskDefinitionArn
- The Amazon Resource Name (ARN) of the of the task definition that
creates the task.public String getContainerInstanceArn()
public void setContainerInstanceArn(String containerInstanceArn)
containerInstanceArn
- The Amazon Resource Name (ARN) of the container instances that host
the task.public Task withContainerInstanceArn(String containerInstanceArn)
Returns a reference to this object so that method calls can be chained together.
containerInstanceArn
- The Amazon Resource Name (ARN) of the container instances that host
the task.public TaskOverride getOverrides()
public void setOverrides(TaskOverride overrides)
overrides
- One or more container overrides.public Task withOverrides(TaskOverride overrides)
Returns a reference to this object so that method calls can be chained together.
overrides
- One or more container overrides.public String getLastStatus()
public void setLastStatus(String lastStatus)
lastStatus
- The last known status of the task.public Task withLastStatus(String lastStatus)
Returns a reference to this object so that method calls can be chained together.
lastStatus
- The last known status of the task.public String getDesiredStatus()
public void setDesiredStatus(String desiredStatus)
desiredStatus
- The desired status of the task.public Task withDesiredStatus(String desiredStatus)
Returns a reference to this object so that method calls can be chained together.
desiredStatus
- The desired status of the task.public List<Container> getContainers()
public void setContainers(Collection<Container> containers)
containers
- The containers associated with the task.public Task withContainers(Container... containers)
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.
Returns a reference to this object so that method calls can be chained together.
containers
- The containers associated with the task.public Task withContainers(Collection<Container> containers)
Returns a reference to this object so that method calls can be chained together.
containers
- The containers associated with the task.public String getStartedBy()
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 void setStartedBy(String startedBy)
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 Task withStartedBy(String startedBy)
startedBy
parameter contains
the deployment ID of the service that starts it.
Returns a reference to this object so that method calls can be chained together.
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 String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.