Description
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
The issue you're having must be related to a file in this repository. We are unable to provide assistance for issues unrelated to samples in this repository.
Please include as much information as possible:
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.
The current code at samples/snippets/quickstart_listassets.py
has project_id
as an argument, instead we can have parent_resource
as an argument, and the parent_resource
can be either projects/ or folders/ or organizations/. We then can change references to project_id with parent_resource in other places.
Describe alternatives you've considered.
Additional context.
(https://cloud.google.com/asset-inventory/docs/reference/rest/v1/assets/list#path-parameters)
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!