aws-sdk-go icon indicating copy to clipboard operation
aws-sdk-go copied to clipboard

resourcegroupstaggingapi GetResourcesInput ResourceTypeFilters unclear for getting all resources

Open estebane22 opened this issue 3 years ago • 3 comments

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: image

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.

estebane22 avatar Dec 01 '21 23:12 estebane22

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?

KaibaLopez avatar Dec 22 '21 00:12 KaibaLopez

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?).

estebane22 avatar Dec 22 '21 15:12 estebane22

@estebane-frb , To select everything simply don't set a filter, by default it should return all available resources.

KaibaLopez avatar Dec 23 '21 23:12 KaibaLopez

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.

github-actions[bot] avatar Dec 24 '22 00:12 github-actions[bot]