Add ability to list assets from Organizations and Folders along with Projects
Thanks for stopping by to let us know something could be better!
Is your feature request related to a problem? Please describe. Current code accepts only projects as "parent" for the Asset API, whereas the API can list assets from Orgs and Folders as well. A small change to accept the other two options for "parent" will make the code more useful. Many people use Asset API to search for resources across multiple projects
Describe the solution you'd like
Current code at samples/snippets/quickstart_listassets.py has project_id as an argument, instead we can have parent_resource as an argument, with the "help" text describing "Parent resource. Either projects/<project id> or folders/<folder id> or organizations/<organization id>". We then can change references to project_id with parent_resource in other places.
Describe alternatives you've considered NA
Additional context https://cloud.google.com/asset-inventory/docs/reference/rest/v1/assets/list#path-parameters
I'm going to transfer this issue to the google-cloud-python repository as we are preparing to move the code for google-cloud-asset to that repository in the next 1-2 weeks.
@shashyajoshi Is this a missing feature in the library, or an error in the sample? Could you confirm the deficiency still exists? In this repo, I believe the relevant sample is here, and the method is here.
No response, so closing the issue.
Note that the arg description lists orgs and folders as acceptable parents.
Feel free to file a new issue if needed.