【发布时间】:2020-02-07 04:14:56
【问题描述】:
所以,基本上与this SO post 中的问题相同,除了我使用的是 Python 并且接受的答案没有帮助。
在控制台 UI 中使用提供的模板:
def hello_firestore(event, context):
"""Triggered by a change to a Firestore document.
Args:
event (dict): Event payload.
context (google.cloud.functions.Context): Metadata for the event.
"""
resource_string = context.resource
# print out the resource string that triggered the function
print(f"Function triggered by change to: {resource_string}.")
# now print out the entire event object
print(str(event))
在触发路径中带有通配符:
'emails/{wildcard}'
我收到以下错误:
部署失败:未能配置触发器 提供者/cloud.firestore/eventTypes/document.create@firestore.googleapis.com (gcf.us-central1.presignups-counter)
与引用的问题类似,从触发器资源中删除通配符时错误会清除:
'emails/wildcard'
编辑:这是功能详细信息的屏幕截图:
【问题讨论】:
-
请编辑问题以准确显示您在控制台中所做的事情。我们需要能够查看您提供的所有确切值
-
@DougStevenson 截图已添加,如有其他需要请告诉我。
标签: python google-cloud-firestore google-cloud-functions