@Generated(value="software.amazon.awssdk:codegen") public final class TaskDefinition extends Object implements StructuredPojo, ToCopyableBuilder<TaskDefinition.Builder,TaskDefinition>
Details of a task definition.
Modifier and Type | Class and Description |
---|---|
static interface |
TaskDefinition.Builder |
Modifier and Type | Method and Description |
---|---|
static TaskDefinition.Builder |
builder() |
List<ContainerDefinition> |
containerDefinitions()
A list of container definitions in JSON format that describe the different containers that make up your task.
|
boolean |
equals(Object obj) |
String |
family()
The family of your task definition, used as the definition name.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
NetworkMode |
networkMode()
The Docker networking mode to use for the containers in the task.
|
String |
networkModeAsString()
The Docker networking mode to use for the containers in the task.
|
List<TaskDefinitionPlacementConstraint> |
placementConstraints()
An array of placement constraint objects to use for tasks.
|
List<Attribute> |
requiresAttributes()
The container instance attributes required by your task.
|
Integer |
revision()
The revision of the task in a particular family.
|
static Class<? extends TaskDefinition.Builder> |
serializableBuilderClass() |
TaskDefinitionStatus |
status()
The status of the task definition.
|
String |
statusAsString()
The status of the task definition.
|
String |
taskDefinitionArn()
The full Amazon Resource Name (ARN) of the task definition.
|
String |
taskRoleArn()
The Amazon Resource Name (ARN) of the IAM role that containers in this task can assume.
|
TaskDefinition.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
List<Volume> |
volumes()
The list of volumes in a task.
|
copy
public String taskDefinitionArn()
The full Amazon Resource Name (ARN) of the task definition.
public List<ContainerDefinition> containerDefinitions()
A list of container definitions in JSON format that describe the different containers that make up your task. For more information about container definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon EC2 Container Service Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public String family()
The family of your task definition, used as the definition name.
public String taskRoleArn()
The Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role.
public NetworkMode networkMode()
The Docker networking mode to use for the containers in the task. The valid values are none
,
bridge
, awsvpc
, and host
.
If the network mode is none
, the containers do not have external connectivity. The default Docker
network mode is bridge
. If the network mode is awsvpc
, the task is allocated an Elastic
Network Interface. The host
and awsvpc
network modes offer the highest networking
performance for containers because they use the EC2 network stack instead of the virtualized network stack
provided by the bridge
mode.
For more information, see Network settings in the Docker run reference.
If the service returns an enum value that is not available in the current SDK version, networkMode
will
return NetworkMode.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
networkModeAsString()
.
none
,
bridge
, awsvpc
, and host
.
If the network mode is none
, the containers do not have external connectivity. The default
Docker network mode is bridge
. If the network mode is awsvpc
, the task is
allocated an Elastic Network Interface. The host
and awsvpc
network modes offer
the highest networking performance for containers because they use the EC2 network stack instead of the
virtualized network stack provided by the bridge
mode.
For more information, see Network settings in the Docker run reference.
NetworkMode
public String networkModeAsString()
The Docker networking mode to use for the containers in the task. The valid values are none
,
bridge
, awsvpc
, and host
.
If the network mode is none
, the containers do not have external connectivity. The default Docker
network mode is bridge
. If the network mode is awsvpc
, the task is allocated an Elastic
Network Interface. The host
and awsvpc
network modes offer the highest networking
performance for containers because they use the EC2 network stack instead of the virtualized network stack
provided by the bridge
mode.
For more information, see Network settings in the Docker run reference.
If the service returns an enum value that is not available in the current SDK version, networkMode
will
return NetworkMode.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
networkModeAsString()
.
none
,
bridge
, awsvpc
, and host
.
If the network mode is none
, the containers do not have external connectivity. The default
Docker network mode is bridge
. If the network mode is awsvpc
, the task is
allocated an Elastic Network Interface. The host
and awsvpc
network modes offer
the highest networking performance for containers because they use the EC2 network stack instead of the
virtualized network stack provided by the bridge
mode.
For more information, see Network settings in the Docker run reference.
NetworkMode
public Integer revision()
The revision of the task in a particular family. The revision is a version number of a task definition in a
family. When you register a task definition for the first time, the revision is 1
; each time you
register a new revision of a task definition in the same family, the revision value always increases by one (even
if you have deregistered previous revisions in this family).
1
; each
time you register a new revision of a task definition in the same family, the revision value always
increases by one (even if you have deregistered previous revisions in this family).public List<Volume> volumes()
The list of volumes in a task. For more information about volume definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon EC2 Container Service Developer Guide.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public TaskDefinitionStatus status()
The status of the task definition.
If the service returns an enum value that is not available in the current SDK version, status
will
return TaskDefinitionStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from statusAsString()
.
TaskDefinitionStatus
public String statusAsString()
The status of the task definition.
If the service returns an enum value that is not available in the current SDK version, status
will
return TaskDefinitionStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available
from statusAsString()
.
TaskDefinitionStatus
public List<Attribute> requiresAttributes()
The container instance attributes required by your task.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<TaskDefinitionPlacementConstraint> placementConstraints()
An array of placement constraint objects to use for tasks.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public TaskDefinition.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<TaskDefinition.Builder,TaskDefinition>
public static TaskDefinition.Builder builder()
public static Class<? extends TaskDefinition.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.