首页 文章

Google Cloud功能和服务帐户

提问于
浏览
0

我想通过Google Cloud Functions访问Youtube Content Owner API . 为此,GCF使用的服务帐户必须能够访问该API .

当我创建Google Cloud功能时,会自动为其分配一个服务帐户 . 在这种情况下,“App Engine默认服务帐户” . 我有几个问题 .

  • Google Cloud功能是否始终使用"App Engine default service account"作为服务帐户?

  • 在编辑 Cloud 功能时,我看不到任何更改Google Cloud功能服务帐户的方法 . 为 Cloud 功能设置后,服务帐户无法更改,对吧?

  • 如果默认服务帐户可以访问Youtube内容所有者API,那么Google Cloud Functions也可以使用它吗?

1 回答

  • 1
    • 是, Cloud 功能使用App Engine默认服务帐户,如here所述 .

    • 确实没有这样的选择 . 如果您有兴趣,有一个公开Feature Request为此打开 .

    • 确实,Cloud Function将从the default service account继承所有访问权限 .

    或者,要使用 Cloud 功能的凭证,然后使用App Engine默认服务帐户,您可以:

    • 使用authentication token

    • 直接使用您的 Cloud 功能上传非默认服务帐户,并按照其中的说明使用它here

相关问题