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


Describes a task definition. You can specify a family and revision to find information about a specific task definition, or you can simply specify the family to find the latest ACTIVE revision in that family.


You can only describe INACTIVE task definitions while an active task or service references them.

Request Syntax

{ "include": [ "string" ], "taskDefinition": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


Specifies whether to see the resource tags for the task definition. If TAGS is specified, the tags are included in the response. If this field is omitted, tags are not included in the response.

Type: Array of strings

Valid Values: TAGS

Required: No


The family for the latest ACTIVE revision, family and revision (family:revision) for a specific revision in the family, or full Amazon Resource Name (ARN) of the task definition to describe.

Type: String

Required: Yes

Response Syntax

{ "tags": [ { "key": "string", "value": "string" } ], "taskDefinition": { "compatibilities": [ "string" ], "containerDefinitions": [ { "command": [ "string" ], "cpu": number, "dependsOn": [ { "condition": "string", "containerName": "string" } ], "disableNetworking": boolean, "dnsSearchDomains": [ "string" ], "dnsServers": [ "string" ], "dockerLabels": { "string" : "string" }, "dockerSecurityOptions": [ "string" ], "entryPoint": [ "string" ], "environment": [ { "name": "string", "value": "string" } ], "essential": boolean, "extraHosts": [ { "hostname": "string", "ipAddress": "string" } ], "healthCheck": { "command": [ "string" ], "interval": number, "retries": number, "startPeriod": number, "timeout": number }, "hostname": "string", "image": "string", "interactive": boolean, "links": [ "string" ], "linuxParameters": { "capabilities": { "add": [ "string" ], "drop": [ "string" ] }, "devices": [ { "containerPath": "string", "hostPath": "string", "permissions": [ "string" ] } ], "initProcessEnabled": boolean, "sharedMemorySize": number, "tmpfs": [ { "containerPath": "string", "mountOptions": [ "string" ], "size": number } ] }, "logConfiguration": { "logDriver": "string", "options": { "string" : "string" }, "secretOptions": [ { "name": "string", "valueFrom": "string" } ] }, "memory": number, "memoryReservation": number, "mountPoints": [ { "containerPath": "string", "readOnly": boolean, "sourceVolume": "string" } ], "name": "string", "portMappings": [ { "containerPort": number, "hostPort": number, "protocol": "string" } ], "privileged": boolean, "pseudoTerminal": boolean, "readonlyRootFilesystem": boolean, "repositoryCredentials": { "credentialsParameter": "string" }, "resourceRequirements": [ { "type": "string", "value": "string" } ], "secrets": [ { "name": "string", "valueFrom": "string" } ], "startTimeout": number, "stopTimeout": number, "systemControls": [ { "namespace": "string", "value": "string" } ], "ulimits": [ { "hardLimit": number, "name": "string", "softLimit": number } ], "user": "string", "volumesFrom": [ { "readOnly": boolean, "sourceContainer": "string" } ], "workingDirectory": "string" } ], "cpu": "string", "executionRoleArn": "string", "family": "string", "ipcMode": "string", "memory": "string", "networkMode": "string", "pidMode": "string", "placementConstraints": [ { "expression": "string", "type": "string" } ], "proxyConfiguration": { "containerName": "string", "properties": [ { "name": "string", "value": "string" } ], "type": "string" }, "requiresAttributes": [ { "name": "string", "targetId": "string", "targetType": "string", "value": "string" } ], "requiresCompatibilities": [ "string" ], "revision": number, "status": "string", "taskDefinitionArn": "string", "taskRoleArn": "string", "volumes": [ { "dockerVolumeConfiguration": { "autoprovision": boolean, "driver": "string", "driverOpts": { "string" : "string" }, "labels": { "string" : "string" }, "scope": "string" }, "host": { "sourcePath": "string" }, "name": "string" } ] } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The metadata that is applied to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.


The full task definition description.

Type: TaskDefinition object


For information about the errors that are common to all actions, see Common Errors.


These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.

HTTP Status Code: 400


The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400


These errors are usually caused by a server issue.

HTTP Status Code: 500


In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information, see Signature Version 4 Signing Process in the AWS General Reference.

You only need to learn how to sign HTTP requests if you intend to create them manually. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you, with the access key that you specify when you configure the tools. When you use these tools, you don't have to sign requests yourself.


This example request provides descriptive information about the 10th revision of a task definition in the hello_world family.

Sample Request

POST / HTTP/1.1 Host: Accept-Encoding: identity Content-Length: 36 X-Amz-Target: AmazonEC2ContainerServiceV20141113.DescribeTaskDefinition X-Amz-Date: 20150429T190902Z Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "taskDefinition": "hello_world:10" }

Sample Response

HTTP/1.1 200 OK Server: Server Date: Wed, 29 Apr 2015 19:09:03 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 574 Connection: keep-alive x-amzn-RequestId: 123a4b56-7c89-01d2-3ef4-example5678f { "taskDefinition": { "containerDefinitions": [ { "cpu": 10, "environment": [], "essential": true, "image": "wordpress", "links": [ "mysql" ], "memory": 500, "mountPoints": [], "name": "wordpress", "portMappings": [ { "containerPort": 80, "hostPort": 80 } ], "volumesFrom": [] }, { "cpu": 10, "environment": [ { "name": "MYSQL_ROOT_PASSWORD", "value": "password" } ], "essential": true, "image": "mysql", "memory": 500, "mountPoints": [], "name": "mysql", "portMappings": [], "volumesFrom": [] } ], "family": "hello_world", "revision": 10, "taskDefinitionArn": "arn:aws:ecs:us-east-1:012345678910:task-definition/hello_world:10", "volumes": [] } }

See Also

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