File size: 2,180 Bytes
20af587 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
**To describe a task definition**
The following ``describe-task-definition`` example retrieves the details of a task definition. ::
aws ecs describe-task-definition \
--task-definition hello_world:8
Output::
{
"taskDefinition": {
"taskDefinitionArn": "arn:aws:ecs:us-east-1:012345678910:task-definition/hello_world:8",
"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": 8,
"volumes": [],
"status": "ACTIVE",
"placementConstraints": [],
"compatibilities": [
"EXTERNAL",
"EC2"
],
"registeredAt": "2024-06-21T11:15:12.669000-05:00",
"registeredBy": "arn:aws:sts::012345678910:assumed-role/demo-role/jane-doe"
},
"tags": []
}
For more information, see `Amazon ECS Task Definitions <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html>`_ in the *Amazon ECS Developer Guide*. |