Firestore帐单与付款使用API [英] Firestore billing & USage API

查看:58
本文介绍了Firestore帐单与付款使用API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道Google是否提供API以编程方式检索Firestore的当前用法吗?

Does anybody know if Google provides an API to programmatically retrieve the current usage of firestore?

更准确地说,我指的是当前的&写入操作,如下所示:

More precisely, I'm referring to the current number of read & write operations, as shown here:

推荐答案

正如您的屏幕截图所示,Firestore提供了一个Monitor来检查您的计划的使用情况.不过,不幸的是,没有API以编程方式返回Firestore的使用情况.

As your screenshot indicates, Firestore provide a Monitor to check the usage of your plan. Unfortunately, though, there is not an API to programmatically return the usage of your Firestore.

但是,如官方文档监控使用情况所述,您可以创建一种警报策略,可根据您设置的限制跟踪您的指标并向您发送电子邮件,通知其使用情况已达到定义的特定点.

However, as mentioned in the official documentation Monitoring usage, you can create an alert policy to track your metrics and send an email to you, based on limits that you set, informing that the usage reached this certain point defined.

完成配置的步骤如下:

  1. 在云监控"页面中,打开您的工作区,然后转到警报页面.
  2. 转到创建新的警报策略"页面
  3. 点击创建策略.
  4. 输入警报策略的名称.
  5. 基于Cloud Firestore之一添加警报条件指标.单击添加条件.
  6. 选择一个目标.在查找资源类型和指标"字段中,输入Cloud Firestore.从自动填充的下拉菜单中,选择以下选项之一Cloud Firestore指标.
  7. 在策略"触发器下,使用下拉字段定义您的警报条件.
  8. 将通知渠道添加到您的警报策略中.在下面通知,单击添加通知频道.从中选择电子邮件下拉菜单.
  9. 在电子邮件地址"字段中输入您的电子邮件.点击添加.
  10. (可选)填写文档字段以包含其他内容电子邮件通知中的信息.
  11. 点击保存.

我相信这会对您有所帮助,即使您不喜欢它不是API.除此之外,我建议您在 Google的系统上提出功能请求以便检查将来是否可以实施.

I believe this should help you, even though it's not an API was you might prefer. Besides that, I would recommend you to raise a Feature Request on Google's system for them to check the possibility of this be implemented in the future.

让我知道信息是否对您有帮助!

Let me know if the information helped you!

这篇关于Firestore帐单与付款使用API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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