Ir para o conteúdo

Only get existing resources with ResourceGroupTaggingAPI

1

I am using the AWS ResourceGroupTagginApi (the get-resources command, https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html) to list all my resources in my account and check if the tags are setup as I want to.

No I notice that the get-resources command also returns resources, that I have already deleted.

The advantage of the ResourceGroupTagginApi for me is, that I can get all resources and there tags using one command, and I don't have to call the service specific apis (which I would have to implement for every service separately).

How can I only return resources that have not been deleted? Or how can I filter the resources out, that have already been deleted without using the service specific APIs?

  • I have the same problem. With resourcegroupstaggingapi get-resources I get backup plans that have been deleted. And when I try to retag or remove them I get the error 400 ResourceNotFoundException. From the console I don't see those plans neither from Tag Editor nor AWS Backup.

feita há 4 anos2 mil visualizações
3 Respostas
0

Hi,

I understand that when running the command “aws resourcegroupstaggingapi get-resources” you are getting resources in the output that have already been deleted.

Testing in my account this command only shows resources that still exist. I was able to test with several different resources and every time they were deleted they no longer showed up in the command. If you notice that there is a specific resource that you have deleted which is still appearing in the results of the CLI command I would recommend opening an AWS support ticket. There an engineer can help troubleshoot the specific issue.

I hope you have a great rest of your day!

AWS
ENGENHEIRO DE SUPORTE
respondido há 4 anos
0

I am having the same issue with EC2 snapshots. Even though the snapshot has been deleted for hours I am still able to see it return on the aws resourcegroupstaggingapi get-resources. We do not have a support plan, how can we understand the issue?

respondido há 4 anos
0

I'm still seeing Aurora clusters years after they were deleted...

respondido há 9 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.