我试图深入了解 Google 计费,尤其是您遵循的规则。
考虑 Google Cloud Platform 上“托管区域”的情况。根据 Google DNS 中的“托管区域”文档,按月按小时计费
托管区域定价是根据一次存在的托管区域的数量计算的,按它们存在的月份的百分比按比例分配。这种按比例分配是按小时计算的。存在不到一小时的区域被视为存在一小时。
但是,根据“Cloud Billing Catalog API”,单位“services/FA26-5236-B8B5/skus/8C22-6FC3-D478”按月按每秒计费。
{
"name": "services/FA26-5236-B8B5/skus/8C22-6FC3-D478",
"skuId": "8C22-6FC3-D478",
"description": "ManagedZone",
"category": {
"serviceDisplayName": "Cloud DNS",
"resourceFamily": "Network",
"resourceGroup": "DNS",
"usageType": "OnDemand"
},
"serviceRegions": [
"global"
],
"pricingInfo": [
{
"summary": "",
"pricingExpression": {
"usageUnit": "mo",
"usageUnitDescription": "month",
"baseUnit": "s",
"baseUnitDescription": "second",
"baseUnitConversionFactor": 2505600,
"displayQuantity": 1,
"tieredRates": [
{
"startUsageAmount": 0,
"unitPrice": {
"currencyCode": "USD",
"units": "0",
"nanos": 200000000
}
},
{
"startUsageAmount": 25,
"unitPrice": {
"currencyCode": "USD",
"units": "0",
"nanos": 100000000
}
},
{
"startUsageAmount": 10000,
"unitPrice": {
"currencyCode": "USD",
"units": "0",
"nanos": 30000000
}
}
]
},
"aggregationInfo": {
"aggregationLevel": "ACCOUNT",
"aggregationInterval": "MONTHLY",
"aggregationCount": 1
},
"currencyConversionRate": 1,
"effectiveTime": "2020-02-07T17:41:49.051Z"
}
],
"serviceProviderName": "Google"
}
字段pricingInfo.0.pricingExpression.baseUnit
提及s
作为基本单位。
在这种情况下,在我看来,文档与 API 响应不一致。
它是否错误地解释了 API 响应?如果是这样,如何以一般方式(通过 API)确定计费使用的基本计量单位是什么?