Class Task

    • Constructor Detail

      • Task

        public Task()
    • Method Detail

      • 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 Task 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.
      • setClusterArn

        public void setClusterArn​(String clusterArn)

        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

        public String 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

        public Task withClusterArn​(String clusterArn)

        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

        public void setTaskDefinitionArn​(String taskDefinitionArn)

        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

        public String 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

        public Task withTaskDefinitionArn​(String taskDefinitionArn)

        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

        public void setContainerInstanceArn​(String containerInstanceArn)

        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

        public String 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

        public Task withContainerInstanceArn​(String containerInstanceArn)

        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

        public void setOverrides​(TaskOverride overrides)

        One or more container overrides.

        Parameters:
        overrides - One or more container overrides.
      • getOverrides

        public TaskOverride getOverrides()

        One or more container overrides.

        Returns:
        One or more container overrides.
      • withOverrides

        public Task withOverrides​(TaskOverride overrides)

        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

        public void setLastStatus​(String lastStatus)

        The last known status of the task.

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

        public String getLastStatus()

        The last known status of the task.

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

        public Task withLastStatus​(String lastStatus)

        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

        public void setDesiredStatus​(String desiredStatus)

        The desired status of the task.

        Parameters:
        desiredStatus - The desired status of the task.
      • getDesiredStatus

        public String getDesiredStatus()

        The desired status of the task.

        Returns:
        The desired status of the task.
      • withDesiredStatus

        public Task withDesiredStatus​(String desiredStatus)

        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

        public List<Container> getContainers()

        The containers associated with the task.

        Returns:
        The containers associated with the task.
      • setContainers

        public void setContainers​(Collection<Container> containers)

        The containers associated with the task.

        Parameters:
        containers - The containers associated with the task.
      • withContainers

        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.

        Parameters:
        containers - The containers associated with the task.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withContainers

        public Task withContainers​(Collection<Container> containers)

        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

        public void setStartedBy​(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.

        Parameters:
        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.
      • getStartedBy

        public 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.

        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

        public Task withStartedBy​(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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setStoppedReason

        public void setStoppedReason​(String stoppedReason)

        The reason the task was stopped.

        Parameters:
        stoppedReason - The reason the task was stopped.
      • getStoppedReason

        public String getStoppedReason()

        The reason the task was stopped.

        Returns:
        The reason the task was stopped.
      • withStoppedReason

        public Task withStoppedReason​(String stoppedReason)

        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

        public void setCreatedAt​(Date createdAt)

        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 the PENDING state).
      • getCreatedAt

        public Date 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

        public Task withCreatedAt​(Date createdAt)

        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 the PENDING state).
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setStartedAt

        public void setStartedAt​(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).

        Parameters:
        startedAt - The Unix time in seconds and milliseconds when the task was started (the task transitioned from the PENDING state to the RUNNING state).
      • getStartedAt

        public 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).

        Returns:
        The Unix time in seconds and milliseconds when the task was started (the task transitioned from the PENDING state to the RUNNING state).
      • withStartedAt

        public Task withStartedAt​(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).

        Parameters:
        startedAt - The Unix time in seconds and milliseconds when the task was started (the task transitioned from the PENDING state to the RUNNING state).
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setStoppedAt

        public void setStoppedAt​(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).

        Parameters:
        stoppedAt - The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from the RUNNING state to the STOPPED state).
      • getStoppedAt

        public 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).

        Returns:
        The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from the RUNNING state to the STOPPED state).
      • withStoppedAt

        public Task withStoppedAt​(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).

        Parameters:
        stoppedAt - The Unix time in seconds and milliseconds when the task was stopped (the task transitioned from the RUNNING state to the STOPPED state).
        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:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object