Class Task
- All Implemented Interfaces:
Serializable, Cloneable
Details on a task in a cluster.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanThe 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 thePENDINGstate).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 thePENDINGstate to theRUNNINGstate).The tag specified when a task is started.The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from theRUNNINGstate to theSTOPPEDstate).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.inthashCode()voidsetClusterArn(String clusterArn) The Amazon Resource Name (ARN) of the cluster that hosts the task.voidsetContainerInstanceArn(String containerInstanceArn) The Amazon Resource Name (ARN) of the container instances that host the task.voidsetContainers(Collection<Container> containers) The containers associated with the task.voidsetCreatedAt(Date createdAt) The Unix time in seconds and milliseconds when the task was created (the task entered thePENDINGstate).voidsetDesiredStatus(String desiredStatus) The desired status of the task.voidsetLastStatus(String lastStatus) The last known status of the task.voidsetOverrides(TaskOverride overrides) One or more container overrides.voidsetStartedAt(Date startedAt) The Unix time in seconds and milliseconds when the task was started (the task transitioned from thePENDINGstate to theRUNNINGstate).voidsetStartedBy(String startedBy) The tag specified when a task is started.voidsetStoppedAt(Date stoppedAt) The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from theRUNNINGstate to theSTOPPEDstate).voidsetStoppedReason(String stoppedReason) The reason the task was stopped.voidsetTaskArn(String taskArn) The Amazon Resource Name (ARN) of the task.voidsetTaskDefinitionArn(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 thePENDINGstate).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 thePENDINGstate to theRUNNINGstate).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 theRUNNINGstate to theSTOPPEDstate).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
-
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
-
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
-
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
-
getContainers
-
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
startedByparameter 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 thestartedByparameter 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
startedByparameter 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
startedByparameter 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
startedByparameter 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 thestartedByparameter 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
-
setCreatedAt
The Unix time in seconds and milliseconds when the task was created (the task entered the
PENDINGstate).- Parameters:
createdAt- The Unix time in seconds and milliseconds when the task was created (the task entered thePENDINGstate).
-
getCreatedAt
The Unix time in seconds and milliseconds when the task was created (the task entered the
PENDINGstate).- Returns:
- The Unix time in seconds and milliseconds when the task was
created (the task entered the
PENDINGstate).
-
withCreatedAt
The Unix time in seconds and milliseconds when the task was created (the task entered the
PENDINGstate).- Parameters:
createdAt- The Unix time in seconds and milliseconds when the task was created (the task entered thePENDINGstate).- 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
PENDINGstate to theRUNNINGstate).- Parameters:
startedAt- The Unix time in seconds and milliseconds when the task was started (the task transitioned from thePENDINGstate to theRUNNINGstate).
-
getStartedAt
The Unix time in seconds and milliseconds when the task was started (the task transitioned from the
PENDINGstate to theRUNNINGstate).- Returns:
- The Unix time in seconds and milliseconds when the task was
started (the task transitioned from the
PENDINGstate to theRUNNINGstate).
-
withStartedAt
The Unix time in seconds and milliseconds when the task was started (the task transitioned from the
PENDINGstate to theRUNNINGstate).- Parameters:
startedAt- The Unix time in seconds and milliseconds when the task was started (the task transitioned from thePENDINGstate to theRUNNINGstate).- 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
RUNNINGstate to theSTOPPEDstate).- Parameters:
stoppedAt- The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from theRUNNINGstate to theSTOPPEDstate).
-
getStoppedAt
The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from the
RUNNINGstate to theSTOPPEDstate).- Returns:
- The Unix time in seconds and milliseconds when the task was
stopped (the task transitioned from the
RUNNINGstate to theSTOPPEDstate).
-
withStoppedAt
The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from the
RUNNINGstate to theSTOPPEDstate).- Parameters:
stoppedAt- The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from theRUNNINGstate to theSTOPPEDstate).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
-
equals
-
hashCode
-
clone
-