gpt4 book ai didi

google-cloud-platform - Google Cloud 函数和服务帐户

转载 作者:行者123 更新时间:2023-12-02 01:02:11 27 4
gpt4 key购买 nike

我想使用 Google Cloud Functions 访问 Youtube Content Owner API。为此,GCF 使用的服务帐户必须有权访问该 API。

当我创建 Google Cloud Function 时,它会自动分配一个服务帐户。在本例中为“App Engine 默认服务帐户”。我对此有几个问题。

  • Google Cloud Function 是否始终使用“App Engine 默认服务帐户”作为服务帐户?
  • 在编辑云函数时,我看不到任何更改 Google 云函数服务帐户的方法。 Cloud Function 一旦设置好,服务账号就不能更改了,对吧?
  • 如果默认服务帐户可以访问 Youtube Content Owner API,那么 Google Cloud Functions 也会拥有它吗?
  • 最佳答案

  • 是的,Cloud Functions 使用 App Engine 默认服务帐户,如 here 所述.
  • 事实上,目前还没有这样的选择。有公众号Feature Request如果您有兴趣,请为此打开。
  • 没错,Cloud Function 将从 the default service account 继承所有访问权限。 .

  • 或者,要使用除 App Engine 默认服务帐户之外的 Cloud Functions 凭据,您可以:
  • 使用 authentication token
  • 直接使用您的 Cloud Functions 功能上传非默认服务帐户,并按照 here 的说明在其中使用它
  • 关于google-cloud-platform - Google Cloud 函数和服务帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49802311/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com