I am using Java client and I would like to list all projects that user has access to (as it appears in GCP console).
- As documentation says it is recommended to use ResourceManager library instead of BigQuery (BigQuery library has no classes to retrieve projects - there is another one called Bigquery (small q) that has some api for calling project, but documentation claims it is using ResourceManager underneath.
- I tried using v3 library version of ResourceManager but apparently it always requires the parent id, but I don't want to give access for listing the folder above because in much more complicated architecture I would have to give access to all organisations and folders and prepare search of all projects. I would like only list projects that current user has access to.
- There is also possibility to use same library but with v1 api version which works like a charm... but it is deprecated and I am not sure how long it will be supported.
- I don't want to use any other clients than Java.
Do you know solution using ResourceManager but not with parent or without granting too many privileges?
Apparently the replacement for
list
issearch
method with empty query string: