Google cloud firestore 设置gcloud storage firestore导出的正确权限

Google cloud firestore 设置gcloud storage firestore导出的正确权限,google-cloud-firestore,google-cloud-functions,google-cloud-storage,gcloud,Google Cloud Firestore,Google Cloud Functions,Google Cloud Storage,Gcloud,有人能指出我遗漏了什么吗?我有一个云函数(根据时间表触发),它执行以下代码: const client = new firestore.v1.FirestoreAdminClient() const projectId = process.env.GCP_PROJECT || process.env.GCLOUD_PROJECT const databaseName = client.databasePath(projectId, '(default)') return client.expor

有人能指出我遗漏了什么吗?我有一个云函数(根据时间表触发),它执行以下代码:

const client = new firestore.v1.FirestoreAdminClient()
const projectId = process.env.GCP_PROJECT || process.env.GCLOUD_PROJECT
const databaseName = client.databasePath(projectId, '(default)')
return client.exportDocuments({name: databaseName, outputUriPrefix: 'gs://BUCKET-NAME', collectionIds: [] })
并且在日志中出现以下情况时失败:

Error: 7 PERMISSION_DENIED: Service account does not have access to Google Cloud Storage file: /XXX-XXX.
Error details: SERV_ACCOUNT@appspot.gserviceaccount.com does not have storage.buckets.get access to the Google Cloud Storage bucket.
这就是该bucket上权限的设置方式(为了确认,我在大约一小时前设置并保存了它——我刚刚重新打开编辑框以获取图像):


所以,据我所知,
SERV_ACCOUNT@appspot.gserviceaccount.com
应该可以完全访问该存储桶。但它声称没有。我遗漏了什么?

我想这是一个相当复杂的系统,但它非常令人沮丧。解决方案是删除该权限,保存它,然后再次添加它。我想,互联网相当于更用力地按按钮。哦,好吧。无论如何都要发布,以防对其他人有所帮助