如何将Team Drive Apps脚本与GCP项目关联? [英] How to associate a Team Drive Apps Script with a GCP project?

查看:82
本文介绍了如何将Team Drive Apps脚本与GCP项目关联?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有:

  • 附加到我的云端硬盘上托管的Google文档的应用脚本.
  • 一个GCP项目
  • 团队合作

我需要将应用程序脚本部署为API可执行文件.为此,需要将应用程序脚本附加到GCP项目,因此在应用程序脚本中,我转到资源">云平台"项目,在更改项目"字段中键入我的GCP项目编号,单击更改后的项目,一切正常

I need to deploy the apps script as an API executable. To do this, the app script needs to be attached to a GCP project so in the apps script I went to Resources > Cloud Platform project, typed in my GCP project number in the "Change Project" field, clicked changed project and everything worked perfectly.

我现在想做的是完全相同的事情,但是Google Doc和附加脚本在我的团队驱动器中,而不是在我的驱动器中.如果将其移至团队驱动器,当我尝试以与上述相同的方式在apps脚本中设置GCP项目时,会收到以下错误消息:

What I am trying to do now is the exact same thing but with the google doc and attached script in my Team Drive instead of in my drive. If I move it to the team drive, when I try to set up the GCP project in apps script in the same way that above, I got the following error message:

项目不存在,或者您需要对其进行编辑访问.

Project doesn't exist or you need edit access to it.

我想是因为当我将文件移到团队驱动器时,我不再是文件的所有者,所以我无法访问GCP项目.但是,我该如何修改权限来做到这一点呢?我曾考虑过将具有良好权限的用户添加到GCP IAM中,但是团队驱动器有特定的用户吗?

I guess it’s because when I move my file to the team drive I’m not the owner of it anymore so I can’t access the GCP project. But then how do I modify permissions to manage to do this ? I thought about adding a user to the GCP IAM with the good rights but is there a specific user for a team drive ?

推荐答案

我无法在共享驱动器中创建新项目并将其转换为Cloud Managed Project.

I couldn't create a new project in a shared drive and convert it to a Cloud Managed Project.

唯一的方法是在我的云端硬盘中的帐户上创建一个新项目,然后将其转换为Cloud Managed Project,然后将其移至共享驱动器. (一旦它位于共享驱动器中,则无法将其移回.)但是,如果它是一个Cloud Managed Project,则可以在该项目位于共享驱动器中之后向该项目添加更多范围. -设置好这个新项目后,然后将代码复制为旧副本,然后将所有链接指向新副本.

The only way I could do it was to create a new project on my account, in My Drive, and convert that to a Cloud Managed Project, THEN move it to the shared drive. (Once it is in a shared drive, you can't MOVE it back out.) However, if it is a Cloud Managed Project, you can add more scopes to the project after it is in the shared drive. - Once this new project is setup, then copy over your code for your old copy, and point all links to the new one.

这篇关于如何将Team Drive Apps脚本与GCP项目关联?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆