Google cloud platform 项目的活动云Firestore数据库以编程方式/使用PHP API

Google cloud platform 项目的活动云Firestore数据库以编程方式/使用PHP API,google-cloud-platform,google-cloud-firestore,Google Cloud Platform,Google Cloud Firestore,我用我的PHP服务帐户访问了一个Google云项目,现在我想激活这个项目的Firestore DB,这样我就可以使用它了。我知道我可以在UI中设置它,但是有没有一种方法可以通过RESTAPI/PHPSDK或任何其他API编程实现呢 在不激活的情况下访问Firestore DB时出现的错误: { "message": "The project XXXXX does not exist or it does not contain an active Cloud Datastore or Cloud

我用我的PHP服务帐户访问了一个Google云项目,现在我想激活这个项目的Firestore DB,这样我就可以使用它了。我知道我可以在UI中设置它,但是有没有一种方法可以通过RESTAPI/PHPSDK或任何其他API编程实现呢

在不激活的情况下访问Firestore DB时出现的错误:

{ "message": "The project XXXXX does not exist or it does not contain an active Cloud Datastore or Cloud Firestore database. Please visit http:\/\/console.cloud.google.com to create a project or https:\/\/console.cloud.google.com\/datastore\/setup?project=XXXXXXX to add a Cloud Datastore or Cloud Firestore database. Note that Cloud Datastore or Cloud Firestore always have an associated App Engine app and this app must not be disabled.", "code": 5, "status": "NOT_FOUND", "details": [] }

您现在可以使用gcloud创建Firestore数据库(Alpha),而不是从云控制台创建Firestore数据库,如本文所述

正如您共享的错误消息所述,云数据存储或云Firestore始终具有关联的应用程序引擎应用程序,并且不得禁用此应用程序

创建一个应用程序引擎应用程序。有关详细信息,请参阅:

gcloud app create --region=europe-west
gcloud alpha firestore databases create --region=europe-west
创建Firestore数据库。有关详细信息,请参阅:

gcloud app create --region=europe-west
gcloud alpha firestore databases create --region=europe-west

您现在可以使用gcloud创建Firestore数据库(Alpha),而不是从云控制台创建Firestore数据库,如本文所述

正如您共享的错误消息所述,云数据存储或云Firestore始终具有关联的应用程序引擎应用程序,并且不得禁用此应用程序

创建一个应用程序引擎应用程序。有关详细信息,请参阅:

gcloud app create --region=europe-west
gcloud alpha firestore databases create --region=europe-west
创建Firestore数据库。有关详细信息,请参阅:

gcloud app create --region=europe-west
gcloud alpha firestore databases create --region=europe-west