【问题标题】:`--trigger-resource' description error for cloud firestore trigger`--trigger-resource' Cloud Firestore 触发器的描述错误
【发布时间】:2020-03-02 12:05:23
【问题描述】:

我正在尝试基于 Cloud Firestore 的 Cloud Functions 触发器示例。使用 gcloud 部署函数时,我收到此错误:

gcloud functions deploy hello_firestore --runtime python32  
    --trigger-event providers/cloud.firestore/eventTypes/document.update  
    --trigger-resource projects/patch-us/databases/ (default) 
    /documents/books/{booksid}

bash:意外标记 `(' 附近的语法错误

有人能指出命令行有什么问题吗?

【问题讨论】:

  • 尝试删除数据库名称周围的括号,例如projects/patch-us/databases/default/documents/books/{booksid}

标签: google-cloud-firestore google-cloud-functions


【解决方案1】:

这是一个非常愚蠢的错误..

gcloud functions deploy hello_firestore --runtime python32 --trigger-event providers/cloud.firestore/eventTypes/document.update --trigger-resource "projects/patch-us/databases/(default)/documents/books/{booksid}"

路径需要在引号内。

【讨论】:

    猜你喜欢
    • 2018-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-15
    • 2020-02-04
    • 2018-10-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多