Menu
Amazon EC2 Container Service
API Reference (API Version 2014-11-13)

TaskDefinition

Details of a task definition.

Contents

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.

Type: Array of ContainerDefinition objects

Required: No

family

The family of your task definition, used as the definition name.

Type: String

Required: No

networkMode

The Docker networking mode to use for the containers in the task. The valid values are none, bridge, and host.

If the network mode is none, the containers do not have external connectivity. The default Docker network mode is bridge. The host network mode offers the highest networking performance for containers because it uses the host network stack instead of the virtualized network stack provided by the bridge mode.

For more information, see Network settings in the Docker run reference.

Type: String

Valid Values: bridge | host | none

Required: No

placementConstraints

An array of placement constraint objects to use for tasks.

Type: Array of TaskDefinitionPlacementConstraint objects

Required: No

requiresAttributes

The container instance attributes required by your task.

Type: Array of Attribute objects

Required: No

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

Type: Integer

Required: No

status

The status of the task definition.

Type: String

Valid Values: ACTIVE | INACTIVE

Required: No

taskDefinitionArn

The full Amazon Resource Name (ARN) of the task definition.

Type: String

Required: No

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.

Type: String

Required: No

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.

Type: Array of Volume objects

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

On this page: