Alexandr Kovalenko
Alexandr Kovalenko

Reputation: 1051

Is it possible get Aws Rds DbInstances by TAG?

So, I'm using Java API: AWS SDK - 2.17 (v2)

API_DescribeDBInstances

There are a couple of default filters, but I want to use my own filter created by TAG.

For example, I can use Filter by Tag for retrieve EC2 instances, but I can't understand how to do that for DbInstances?

This doesn't work

    Filter filter = Filter.builder().name("TAG_NAME").values("TAG_VALUE").build();
    DescribeDbInstancesRequest request = DescribeDbInstancesRequest.builder()
            .filters(filter)
            .build();
    DescribeDbInstancesResponse response = amazonRDS.describeDBInstances(request);

But pretty same code works for EC2 Instances (API v1)

Upvotes: 0

Views: 302

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 270224

No. The DescribeDbInstances() API call can only filter on IDs, domain and engine.

You would need to do the filtering in your own code.

Upvotes: 1

Related Questions