Google cloud platform 如何找到与google帐户上的成本相关的gcp服务名称?
使用bq数据,我们可以列出Google cloud platform 如何找到与google帐户上的成本相关的gcp服务名称?,google-cloud-platform,billing,Google Cloud Platform,Billing,使用bq数据,我们可以列出 { "svc_desc": "Cloud function", "service_id": "6F81-5220-406A", "labels": "null", "final_cost": "10.0" }, { "svc_desc": "Cloud function", "service_id": "5490-F789-0DF2", "labels": "null", "final_cos
{
"svc_desc": "Cloud function",
"service_id": "6F81-5220-406A",
"labels": "null",
"final_cost": "10.0"
},
{
"svc_desc": "Cloud function",
"service_id": "5490-F789-0DF2",
"labels": "null",
"final_cost": "20.0"
}
如果我请求google计费端点传递服务id,比如{api_key}
这将显示SKU列表,但没有资源的真实名称,只是显示“它是一个云功能”。有人知道我们如何获得与这些成本相关的云功能的名称
谢谢我写了一篇关于账单目录API的文章 此显示名为
.skus[].category.serviceDisplayName
示例:
curl https://cloudbilling.googleapis.com/v1/services/6F81-5844-456A/skus?key=API_KEY
{
"skus": [
{
"name": "services/6F81-5844-456A/skus/0009-EA63-4404",
"skuId": "0009-EA63-4404",
"description": "Licensing Fee for Bitnami RabbitMQ (CPU cost)",
"category": {
"serviceDisplayName": "Compute Engine",
"resourceFamily": "License",
"resourceGroup": "BitnamiRabbitMQ",
"usageType": "OnDemand"
},
"serviceRegions": [
"global"
],
"pricingInfo": [
{
"summary": "",
"pricingExpression": {
"usageUnit": "h",
"usageUnitDescription": "hour",
"baseUnit": "s",
"baseUnitDescription": "second",
"baseUnitConversionFactor": 3600,
"displayQuantity": 1,
"tieredRates": [
{
"startUsageAmount": 0,
"unitPrice": {
"currencyCode": "USD",
"units": "0",
"nanos": 0
}
}
]
},
"currencyConversionRate": 1,
"effectiveTime": "2018-10-28T03:11:58.735Z"
}
],
"serviceProviderName": "Google"
},
输出:
curl https://cloudbilling.googleapis.com/v1/services/6F81-5844-456A/skus?key=API_KEY
{
"skus": [
{
"name": "services/6F81-5844-456A/skus/0009-EA63-4404",
"skuId": "0009-EA63-4404",
"description": "Licensing Fee for Bitnami RabbitMQ (CPU cost)",
"category": {
"serviceDisplayName": "Compute Engine",
"resourceFamily": "License",
"resourceGroup": "BitnamiRabbitMQ",
"usageType": "OnDemand"
},
"serviceRegions": [
"global"
],
"pricingInfo": [
{
"summary": "",
"pricingExpression": {
"usageUnit": "h",
"usageUnitDescription": "hour",
"baseUnit": "s",
"baseUnitDescription": "second",
"baseUnitConversionFactor": 3600,
"displayQuantity": 1,
"tieredRates": [
{
"startUsageAmount": 0,
"unitPrice": {
"currencyCode": "USD",
"units": "0",
"nanos": 0
}
}
]
},
"currencyConversionRate": 1,
"effectiveTime": "2018-10-28T03:11:58.735Z"
}
],
"serviceProviderName": "Google"
},
你好,约翰,谢谢你的回答,是的,我也有这个信息,就像你的回答,这是一个计算引擎,但你知道哪一个吗?我的意思是我知道这是一个“云函数”的显示名称,但我想知道这是哪个云函数。资源的真实名称,比如“测试函数”,你读过我的文章吗?编辑你的问题,包括你所拥有的以及你正在寻找的信息。计费目录API没有关于资源名称的信息,只有资源。例如,您提到
真实资源名称
。这到底是什么意思?改进你的问题以得到一个好的答案。你好,谢谢你的建议,我已经编辑了我的问题。我想知道与成本相关的云功能的名称。我的帐户上有一个很大的云函数列表,其中一些没有标签,我无法确定哪一个缺少标签。因此,我想确定具有此成本的函数的名称,或者如何确定我的帐户上没有标签的gcf。您需要使用计费API,而不是计费目录API