내용으로 건너뛰기

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.

질문됨 4년 전2천회 조회
3개 답변
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
지원 엔지니어
답변함 4년 전
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?

답변함 4년 전
0

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

답변함 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠