'programatically find the not tagged resources in aws

import boto3

client = boto3.client('resourcegroupstaggingapi', region_name="us-east-1")

def lambda_handler(event, context): response = client.get_resources(

ResourceTypeFilters=[
    "All supported resource types"
],

TagFilters=[
    {
        'Key': 'Name',
        'Values': [
            '(not tagged)',
        ]
    },
],

)

print(response)

when i run the above code to find the not tagged resources in my aws account it showing error like this "errorMessage": "An error occurred (InvalidParameterException) when calling the GetResources operation: Unsupported service=All supported resource types in ResourceTypeFilter - All supported resource types", "errorType": "InvalidParameterException",

can anyone help to solve this error?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source