我可以按实例名称查看 GCP 计费吗?(不是按类型)我正在尝试按实例名称过滤 GCP 计费,这可能吗?我只成功按 GCP Compute Engine 和实例类型(n1-standard)等过滤...
我正在尝试以编程方式将与 GCP 计算实例关联的 machineType 与相应的计费 SKU 匹配,但无法找到直接关联的密钥。例如,下面是 machineType API 的响应:
{
"kind": "compute#machineType",
"name": "n1-standard-32",
"description": "32 vCPUs, 120 GB RAM",
"guestCpus": 32,
"memoryMb": 122880,
"imageSpaceGb": 0,
"maximumPersistentDisks": 128,
"maximumPersistentDisksSizeGb": "65536",
"zone": "us-east1-b",
"isSharedCpu": false
}
以下是来自 cloudbilling API 的相应 SKU:
"name": "services/XXXX/skus/XXXX",
"skuId": "XXXX",
"description": "Standard Intel N1 32 VCPU running in Americas",
"category": {
"serviceDisplayName": "Compute Engine",
"resourceFamily": "Compute",
"resourceGroup": "N1Standard",
"usageType": "OnDemand"
},
"serviceRegions": [
"us-central1",
"us-east1",
"us-west1"
],
"pricingInfo": [
{
"summary": "",
"pricingExpression": {
"usageUnit": "h",
"usageUnitDescription": "hour",
"baseUnit": "s",
"baseUnitDescription": "second",
"baseUnitConversionFactor": 3600,
"displayQuantity": 1,
"tieredRates": [
{
"startUsageAmount": 0,
"unitPrice": {
"currencyCode": "USD",
"units": "1",
"nanos": 520000000
}
}
]
},
"currencyConversionRate": 1,
"effectiveTime": "2018-02-22T12:00:16.647Z"
}
],
"serviceProviderName": "Google"
计费 SKU 中似乎没有值为 n1-standard-32 的字段。我们如何将这两者联系在一起,就像这个页面看起来一样:https ://cloud.google.com/compute/pricing ?