Difference between revisions of "Aws ecs describe-task-definition"

From wikieduonline
Jump to navigation Jump to search
 
(22 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html
 
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html
  
  aws ecs describe-task-definition --task-definition hello_world:8
+
  aws ecs describe-task-definition [[--task-definition]] hello_world:8
 +
aws ecs describe-task-definition --task-definition hello_world
  
 +
Describe all task definitions:
 +
{{describe aws ecs list-task-definitions}}
  
 +
== Official output ==
  
 +
{
 +
    "taskDefinition": {
 +
        "volumes": [],
 +
        "taskDefinitionArn": "arn:aws:ecs:us-west-2:123456789012:task-definition/hello_world:8",
 +
        "[[containerDefinitions]]": [
 +
            {
 +
                "environment": [],
 +
                "name": "wordpress",
 +
                "[[links]]": [
 +
                    "mysql"
 +
                ],
 +
                "mountPoints": [],
 +
                "image": "wordpress",
 +
                "[[essential]]": true,
 +
                "[[portMappings]]": [
 +
                    {
 +
                        "containerPort": 80,
 +
                        "hostPort": 80
 +
                    }
 +
                ],
 +
                "memory": 500,
 +
                "cpu": 10,
 +
                "volumesFrom": []
 +
            },
 +
            {
 +
                "environment": [
 +
                    {
 +
                        "name": "MYSQL_ROOT_PASSWORD",
 +
                        "value": "password"
 +
                    }
 +
                ],
 +
                "name": "mysql",
 +
                "mountPoints": [],
 +
                "image": "mysql",
 +
                "cpu": 10,
 +
                "portMappings": [],
 +
                "memory": 500,
 +
                "essential": true,
 +
                "volumesFrom": []
 +
            }
 +
        ],
 +
        "family": "hello_world",
 +
        "revision": 8
 +
    }
 +
}
 +
 +
== Additional outputs ==
 +
 +
 +
.../...
 +
                "[[logConfiguration]]": {
 +
                    "[[logDriver]]": "[[awslogs]]",
 +
                    "options": {
 +
                        "awslogs-group": "YOUR_log_group",
 +
                        "awslogs-region": "eu-central-1",
 +
                        "[[awslogs-stream-prefix]]": "api"
 +
                    },
 +
                    "secretOptions": []
 +
                },
 +
                "systemControls": []
 +
            }
 +
.../...
 +
        ],
 +
        "placementConstraints": [],
 +
        "compatibilities": [
 +
            "EC2",
 +
            "[[FARGATE]]"
 +
        ],
 +
        "requiresCompatibilities": [
 +
            "FARGATE"
 +
        ],
 +
        "cpu": "1024",
 +
        "memory": "2048",
 +
        "registeredAt": "2022-05-11T14:30:32.103000+02:00",
 +
        "[[registeredBy]]": "arn:aws:iam::0987654321:user/your_ci_user"
 +
    }
 +
}
 +
 +
== Without task definition ==
 
  aws ecs describe-task-definition
 
  aws ecs describe-task-definition
 
   
 
   
Line 18: Line 101:
  
 
== Related ==
 
== Related ==
 
 
* <code>[[aws ecs list-task-definitions]]</code>
 
* <code>[[aws ecs list-task-definitions]]</code>
 +
* <code>[[aws ecs register-task-definition]]</code>
 +
* <code>[[yarn start]]</code>
 +
* "networkMode": "awsvpc"
 +
* [[memoryReservation]]
  
 
== See also ==
 
== See also ==
 +
* {{aws ecs tasks}}
 
* {{aws ecs}}
 
* {{aws ecs}}
 
* {{AWS ECS}}
 
* {{AWS ECS}}
  
 
[[Category:AWS]]
 
[[Category:AWS]]

Latest revision as of 19:58, 29 May 2023

https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/describe-task-definition.html

aws ecs describe-task-definition --task-definition hello_world:8
aws ecs describe-task-definition --task-definition hello_world

Describe all task definitions:

 for TASK in $(aws ecs list-task-definitions | grep arn  | cut -d"/" -f2 | cut -d'"' -f1); do aws ecs describe-task-definition --task-definition $TASK; done

Official output[edit]

{
   "taskDefinition": {
       "volumes": [],
       "taskDefinitionArn": "arn:aws:ecs:us-west-2:123456789012:task-definition/hello_world:8",
       "containerDefinitions": [
           {
               "environment": [],
               "name": "wordpress",
               "links": [
                   "mysql"
               ],
               "mountPoints": [],
               "image": "wordpress",
               "essential": true,
               "portMappings": [
                   {
                       "containerPort": 80,
                       "hostPort": 80
                   }
               ],
               "memory": 500,
               "cpu": 10,
               "volumesFrom": []
           },
           {
               "environment": [
                   {
                       "name": "MYSQL_ROOT_PASSWORD",
                       "value": "password"
                   }
               ],
               "name": "mysql",
               "mountPoints": [],
               "image": "mysql",
               "cpu": 10,
               "portMappings": [],
               "memory": 500,
               "essential": true,
               "volumesFrom": []
           }
       ],
       "family": "hello_world",
       "revision": 8
   }
}

Additional outputs[edit]

.../...
                "logConfiguration": {
                    "logDriver": "awslogs",
                    "options": {
                        "awslogs-group": "YOUR_log_group",
                        "awslogs-region": "eu-central-1",
                        "awslogs-stream-prefix": "api"
                    },
                    "secretOptions": []
                },
                "systemControls": []
            }
.../...
       ],
       "placementConstraints": [],
       "compatibilities": [
           "EC2",
           "FARGATE"
       ],
       "requiresCompatibilities": [
           "FARGATE"
       ],
       "cpu": "1024",
       "memory": "2048",
       "registeredAt": "2022-05-11T14:30:32.103000+02:00",
       "registeredBy": "arn:aws:iam::0987654321:user/your_ci_user"
   }
}

Without task definition[edit]

aws ecs describe-task-definition

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

aws: error: the following arguments are required: --task-definition

Related[edit]

See also[edit]

Advertising: