我正在尝试以编程方式将与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/6F81-5844-456A/skus/0E44-46AC-E398",
"skuId": "0E44-46AC-E398",
"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?