CmdID

CmdID / aws / aws ecs

aws ecs list-task-definitions

Returns a list of task definitions that are registered to your account. AWS CLI reference

2 examples 5 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

Example 1: To list the registered task definitions

The following list-task-definitions example lists all of the registered task definitions.

aws ecs list-task-definitionsIdentify
Its output
{
    "taskDefinitionArns": [
        "arn:aws:ecs:us-west-2:123456789012:task-definition/sleep300:2",
        "arn:aws:ecs:us-west-2:123456789012:task-definition/sleep360:1",
        "arn:aws:ecs:us-west-2:123456789012:task-definition/wordpress:3",
        "arn:aws:ecs:us-west-2:123456789012:task-definition/wordpress:4",
        "arn:aws:ecs:us-west-2:123456789012:task-definition/wordpress:5",
        "arn:aws:ecs:us-west-2:123456789012:task-definition/wordpress:6"
    ]
}

For more information, see Amazon ECS task definitions in the Amazon ECS Developer Guide.

Example 2: To list the registered task definitions in a family

The following list-task-definitions example lists the task definition revisions of a specified family.

aws ecs list-task-definitions --family-prefix wordpressIdentify
--family-prefixThe full family name to filter the ListTaskDefinitions results with.
Its output
{
    "taskDefinitionArns": [
        "arn:aws:ecs:us-west-2:123456789012:task-definition/wordpress:3",
        "arn:aws:ecs:us-west-2:123456789012:task-definition/wordpress:4",
        "arn:aws:ecs:us-west-2:123456789012:task-definition/wordpress:5",
        "arn:aws:ecs:us-west-2:123456789012:task-definition/wordpress:6"
    ]
}

For more information, see Amazon ECS task definitions in the Amazon ECS Developer Guide.

Options

5 in the AWS CLI reference
--family-prefixThe full family name to filter the ListTaskDefinitions results with.
--max-resultsThe maximum number of task definition results that ListTaskDefinitions returned in paginated output.
--next-tokenThe nextToken value returned from a ListTaskDefinitions request indicating that more results are available to fulfill the request and further calls will be needed.
--sortThe order to sort the results in.
--statusThe task definition status to filter the ListTaskDefinitions results with.