Issue
I have Google Cloud Service account and projectId and want to get projectNumber programmatically from Java.
How can I get it?
Basically I have Service Account and want to use it for granting role "roles/storage.legacyBucketWriter" for the account "[email protected]" in the Google Cloud Storage Bucket.
Solution
I think GCP did not provide an API to map a project ID to a project number. But they did provide a project list API, after you get the list of the projects. You can map the project number by yourself.
Answered By - Lee
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.