GCP Firestore API不适用于Cloud Datastore项目 [英] GCP Firestore API is not available for Cloud Datastore projects

查看:95
本文介绍了GCP Firestore API不适用于Cloud Datastore项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按照产品网站上的简单快速示例,我试图使用GCP文件存储,并收到错误消息:"google.api_core.exceptions.FailedPrecondition:400 Cloud Firestore API不适用于Cloud Datastore项目."

I was trying to use the GCP filestore, following the simple quick example in the product website and get an error: "google.api_core.exceptions.FailedPrecondition: 400 The Cloud Firestore API is not available for Cloud Datastore projects."

我之前在同一项目中确实使用过数据存储,然后我在项目中禁用了数据存储api并尝试了该示例,但仍然遇到相同的错误,除了创建新项目之外,任何人都可以建议做什么?

I did use the datastore before in the same project, I then disabled the datastore api in the project and try out the example, still get the same error any one can suggest what to do other than creating a new project ?

推荐答案

如果您有一个空的Cloud Datastore数据库,并且从未执行过对该数据库的写入操作,则可以通过以下方式升级到Data Store模式或本机模式下的Cloud Firestore:数据存储/实体"页面上的升级到存储"按钮.

If you have an empty Cloud Datastore database and you never executed a write to the database, you can upgrade to Cloud Firestore in Datastore mode or Native mode, by clicking the ‘’UPGRADE TO FIRESTORE’ button on the ‘Datastore/Entities’ page.

如果未收到该选项,则您的数据库实例将在将来的日期自动升级(链接).如果您以数据存储模式从Cloud Datastore升级到Cloud Firestore或从Datastore模式升级到纯模式,则无法撤消该操作.

If you do not receive the option, then your database instance will be automatically upgraded at a future date(link). If you upgrade from Cloud Datastore to Cloud Firestore in Datastore mode or from Datastore mode to Native mode, you cannot undo the operation.

以下是文档的链接: https://cloud.google.com/datastore/docs/upgrade-to-firestore

这篇关于GCP Firestore API不适用于Cloud Datastore项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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