python-3.x - 有没有办法为推送交付类型的 Google Pub/Sub 订阅设置标签?
问题描述
我想在(推送)订阅上设置标签,以便能够区分每项服务的成本。
当我尝试在控制台上添加标签时,我收到消息“无法保存标签”。然后我尝试使用 HTML 元标记验证域,但收到以下错误消息。“INVALID_ARGUMENT:提供的 HTTP URL 未在订阅的父项目中注册。”
有没有办法以这种格式验证域名 https://{hash}-dot-{hash}.appspot.com/_ah/push-handlers/pubsub/projects/{project-id}/topics/{topic -id}?pubsub_trigger=true ?
我可以使用 HTML 元标记验证域,该标记的 URL 格式 为 https://us-central1-.cloudfunctions.net/。
我只是想知道我是否真的需要验证推送订阅端点域才能添加标签来推送订阅?
gcloud pubsub subscriptions update subscription_name --update-labels env=dev --push-endpoint=https://hashA-dot-hashB-tp.appspot.com/_ah/push-handlers/pubsub/projects/project_id/topics/topic_id?pubsub_trigger=true
解决方案
您尝试修改的此订阅由 Cloud Functions 管理,这意味着您将无法设置其标签。
推荐阅读
- acumatica - Acumatica 货币汇率行为
- javascript - 我的柏林噪声函数有什么问题?
- c - 燃油喷射和 tps 摩托车的慢 SD 写入
- node.js - React Native 可以使用本地文件夹作为“包名”。这叫什么?
- jackrabbit-oak - 从橡树段存储创建 TransientRepository
- javascript - 如何从 Form Extjs 6.0.2 中获取 DisplayField 的值?
- node.js - nodejs, mongodb 使用 forEach 查找并更新
- php - 更改文本以阅读更多内容和评论
- r - 如何每隔几行向我的数据框添加更多行
- c++ - 是否可以将 Lua 脚本修改为要求?