Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to list assets from Orgs & Folders #9645

Closed
wants to merge 2 commits into from
Closed

Add ability to list assets from Orgs & Folders #9645

wants to merge 2 commits into from

Conversation

shashyajoshi
Copy link

Description

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.

The current code at 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.

Fixes #9641

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

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.

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/<project id> or folders/<folder id> or organizations/<organization id>. We then can change references to project_id with parent_resource in other places.
Add ability to list assets from Orgs & Folders
@shashyajoshi shashyajoshi requested a review from a team as a code owner April 16, 2023 15:04
@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: asset labels Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: asset samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to list assets from Organizations and Folders along with Projects
2 participants