Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
What you would like to accomplish:
Check if a project exists programmatically (Through APIs) without directly attempting to create the project.
Background
As of now, the projects.get API method [1] returns the following error message [2] when retrieving a project. As noted by the “message” field;
“Permission {Permission name} denied on resource {Resource name} (or it may not exist)”
There is currently no way to determine whether it wasn’t possible to retrieve the project because it does not exist, or because no permissions are granted on the project. The only way to verify if a project exists, and rule out permission-related blockages, is by attempting to create it directly by using methods such as projects.create [3].
How this might work:
Implementing a distinction for the error message returned with the projects.get method [1] or, alternatively, a different method which allows to test if a project exists.
Attachments:
[1]https://cloud.google.com/resource-manager/reference/rest/v3/projects/get
[2]
[3]https://cloud.google.com/resource-manager/reference/rest/v3/projects/create