Add ability to list assets from Organizations and Folders along with Projects #9641
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
samples
Issues that are directly related to samples.
triage me
I really want to be triaged.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
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
hasproject_id
as an argument, instead we can haveparent_resource
as an argument, and theparent_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!
The text was updated successfully, but these errors were encountered: