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