API检索Google API使用
我正在寻找Google Rest端点或SDK,该端点将报告特定项目和Google API的配额使用情况。例如,如果我编写一个查询,
{
"project": "my-project",
"api": "searchconsole.googleapis.com",
"function": "/urlInspection/index:inspect"
}
则会返回该API的配额用法,例如,
{
"qpd": {
"used": 20,
"limit": 200
}
}
我找到了 so so post 2018年使用limeseries
查询 conitoring.googleapis.com ,但这似乎是“骇人听闻的”,而且虽然很老,所以我想知道是否有更好的方法。我试图研究 https://cloud.google.com/monitoring/monitoring/api/api/metrics/metrics_gcp 但是由于我没有监视的经验,因此该文档令人困惑。
I am looking for a Google REST endpoint or SDK that will report the quota usage of a specific project and Google API. For example, if I write a query like
{
"project": "my-project",
"api": "searchconsole.googleapis.com",
"function": "/urlInspection/index:inspect"
}
it will return the quota usage for that API, e.g.
{
"qpd": {
"used": 20,
"limit": 200
}
}
I've found this SO post from 2018 that uses a timeseries
query to monitoring.googleapis.com, but it seems "hacky" and as it's old, I'm wondering if there's a better way. I tried looking into https://cloud.google.com/monitoring/api/metrics_gcp but as I have no prior experience with monitoring, the documentation is confusing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论