@Generated(value="software.amazon.awssdk:codegen") public final class Task extends Object implements StructuredPojo, ToCopyableBuilder<Task.Builder,Task>
Details on a task in a cluster.
Modifier and Type | Class and Description |
---|---|
static interface |
Task.Builder |
Modifier and Type | Method and Description |
---|---|
List<Attachment> |
attachments()
The Elastic Network Adapter associated with the task if the task uses the
awsvpc network mode. |
static Task.Builder |
builder() |
String |
clusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the task.
|
String |
containerInstanceArn()
The Amazon Resource Name (ARN) of the container instances that host the task.
|
List<Container> |
containers()
The containers associated with the task.
|
Instant |
createdAt()
The Unix timestamp for when the task was created (the task entered the
PENDING state). |
String |
desiredStatus()
The desired status of the task.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
String |
group()
The name of the task group associated with the task.
|
int |
hashCode() |
String |
lastStatus()
The last known status of the task.
|
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
TaskOverride |
overrides()
One or more container overrides.
|
static Class<? extends Task.Builder> |
serializableBuilderClass() |
Instant |
startedAt()
The Unix timestamp for when the task was started (the task transitioned from the
PENDING state to
the RUNNING state). |
String |
startedBy()
The tag specified when a task is started.
|
Instant |
stoppedAt()
The Unix timestamp for when the task was stopped (the task transitioned from the
RUNNING state to
the STOPPED state). |
String |
stoppedReason()
The reason the task was stopped.
|
String |
taskArn()
The Amazon Resource Name (ARN) of the task.
|
String |
taskDefinitionArn()
The Amazon Resource Name (ARN) of the task definition that creates the task.
|
Task.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
Long |
version()
The version counter for the task.
|
copy
public String taskArn()
The Amazon Resource Name (ARN) of the task.
public String clusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the task.
public String taskDefinitionArn()
The Amazon Resource Name (ARN) of the task definition that creates the task.
public String containerInstanceArn()
The Amazon Resource Name (ARN) of the container instances that host the task.
public TaskOverride overrides()
One or more container overrides.
public String lastStatus()
The last known status of the task.
public String desiredStatus()
The desired status of the task.
public List<Container> containers()
The containers associated with the task.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public 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
parameter contains the deployment ID of the service that starts it.public Long version()
The version counter for the task. Every time a task experiences a change that triggers a CloudWatch event, the
version counter is incremented. If you are replicating your Amazon ECS task state with CloudWatch events, you can
compare the version of a task reported by the Amazon ECS APIs with the version reported in CloudWatch events for
the task (inside the detail
object) to verify that the version in your event stream is current.
detail
object) to verify that the
version in your event stream is current.public String stoppedReason()
The reason the task was stopped.
public Instant createdAt()
The Unix timestamp for when the task was created (the task entered the PENDING
state).
PENDING
state).public Instant startedAt()
The Unix timestamp for when the task was started (the task transitioned from the PENDING
state to
the RUNNING
state).
PENDING
state to the RUNNING
state).public Instant stoppedAt()
The Unix timestamp for when the task was stopped (the task transitioned from the RUNNING
state to
the STOPPED
state).
RUNNING
state to the STOPPED
state).public String group()
The name of the task group associated with the task.
public List<Attachment> attachments()
The Elastic Network Adapter associated with the task if the task uses the awsvpc
network mode.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
awsvpc
network
mode.public Task.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<Task.Builder,Task>
public static Task.Builder builder()
public static Class<? extends Task.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.