aws-sdk-go
aws-sdk-go copied to clipboard
resourcegroupstaggingapi GetResourcesInput ResourceTypeFilters unclear for getting all resources
Describe the issue with documentation See this type GetResourcesInput the ResourceTypeFilters does not clarify what to use for obtaining all supported resource types.
Seeing as the AWS Console has a "All Supported resource types" filter option, the documentation should clarify what to use when all is needed:
To Reproduce (observed behavior) Using "*:*" does not work. Also leaving this field empty does not return all the resources I see when I make the call via the console.
var resourceTypeFilters []*string
resourceTypeFilters = append(resourceTypeFilters, aws.String("*:*"))
resourcesOutput, err := rgTagSvc.GetResources(&resourcegroupstaggingapi.GetResourcesInput{
ResourceTypeFilters: resourceTypeFilters,
})
Expected behavior Documentation should specify default behavior when ResourceTypeFilters is not specified. It should also provide an example of when to get all resources.
Hi @estebane-frb , Yea, the documentation is definitely not perfect and we do have some pain points. For this specific case though I'd like to comment a couple things: The console and the SDK s have a different features and not all are translatable. It sounds like what you are looking for in terms of documentation would be in the API guide? It might stil be incomplete but this questions are more on the api result rather than the SDKs implementation of it?
Hi @KaibaLopez thanks for your response. Unfortunately the API guide is also not clear. I also looked through SDK documentation for other languages and the AWS CLI and it does not provide a good example.
Is there an example you can provide to answer my question? (How do I set the resource filter to select everything?).
@estebane-frb , To select everything simply don't set a filter, by default it should return all available resources.
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.