Home > Software engineering >  Is it possible get Aws Rds DbInstances by TAG?
Is it possible get Aws Rds DbInstances by TAG?

Time:12-24

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)

CodePudding user response:

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

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

  • Related