简体   繁体   中英

correlate GCP sys- with GCP project

Is there any way to correlate GCP project IDs to Apps Script project name? Apps scripts create a default GCP project internally. We need to correlate appscripts with the gcp project

I suggest having a look into [1-3] I'm too lazy to check them myself but I'm sure one of the REST APIs retrieves exactly the information you can then use to correlate a certain apps script to a certain project and such.

You can have a look through both list/get I'm 100% sure you can find a way to correlate the information you need, and it's a must since there is no out of the box way of doing it atm.


[1] https://developers.google.com/apps-script/api/reference/rest/v1/projects.deployments/list?hl=en [2] https://developers.google.com/apps-script/api/reference/rest/v1/projects/get?hl=en [3] https://developers.google.com/apps-script/api/reference/rest/v1/projects.versions/get?hl=en

You can check the official documentation to switch a script's default GCP project to a standard GCP project. If you are using the new editor, please follow the steps below:

  1. If you don't have a suitable GCP project, create a new one by following the Create a project instructions. Set a memorable GCP project name so that you can more easily locate it in the GCP console Manage Resources page. This name is also used to identify the script when Apps Script asks users to authorize it.

  2. If you want to use an existing GCP project, open the GCP console Manage Resources page and locate an existing GCP project to use. You must have resourcemanager.projects.update permissions for the GCP project. You can't use a project that was automatically created by Apps Script.

  3. Determine the Project number of your GCP project .

  4. Open the script whose GCP project you want to replace.

  5. At the left, click Project Settings settings.

  6. Under Google Cloud Platform (GCP) Project, click Change project.

  7. Enter the new project number and click Set project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM