Search code examples
restgoogle-cloud-platformgoogle-apigcloud

Is there any API to validate project ID before creating a project in GCP


I am trying to create a project in GCP using GCP Rest APIs. What I want to know is that is there any API that is available to just validate the given project id or should I have to hit the create project API every time and handle the error if the given id is already available.

Thanks in advance.


Solution

  • There is no API that checks whether project Id is already used or not in advance.

    If you are worried about project ID duplication, I recommend using your domain name as the prefix for project id.

    It will be help to avoid such a "project id already exists" errors