Skip to content

bug: aws ds describe-directories does not return resource tags #9335

@RoseSecurity

Description

@RoseSecurity

Describe the bug

The aws ds describe-directories command does not include tags in its response, making it difficult to retrieve tag data without calling list-tags-for-resource separately.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

  • The response should include a Tags field containing key-value pairs for each directory.
{
    "DirectoryDescriptions": [
        {
            "DirectoryId": "d-xxxxxxxxxx",
            "Name": "example.com",
            "Tags": [
                {"Key": "Environment", "Value": "Production"},
                {"Key": "Owner", "Value": "DevOps"}
            ]
        }
    ]
}

Current Behavior

  • The response does not include any Tags field.
  • Currently, retrieving tags requires an additional API call:
aws ds list-tags-for-resource --resource-id d-xxxxxxxxxx

Reproduction Steps

  1. Describe directory services
aws ds describe-directories

Possible Solution

  • Update the AWS CLI’s describe-directories command to optionally include tags.
  • This could be done via:
    • A new flag, e.g., --include-tags
    • Expanding the default output schema if AWS Directory Service supports it.

Additional Information/Context

No response

CLI version used

aws-cli/2.24.9

Environment details (OS name and version, etc.)

Python/3.12.6 Linux/6.12.5-orbstack-00287-gf8da5d508983 exe/aarch64.debian.12

Metadata

Metadata

Labels

directoryserviceDirectory Service makes it easy for you to setup and run directories in the AWS cloudfeature-requestA feature should be added or improved.p3This is a minor priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions