Google cloud platform GCP:使用catlog API识别正确的实例(N18标准、N1Highmem等)
我们目前正在开发GCP定价模块,为此,我们正在使用该模块获取各种GCP服务的定价 在分析Google cloud platform GCP:使用catlog API识别正确的实例(N18标准、N1Highmem等),google-cloud-platform,google-compute-engine,google-cloud-sdk,Google Cloud Platform,Google Compute Engine,Google Cloud Sdk,我们目前正在开发GCP定价模块,为此,我们正在使用该模块获取各种GCP服务的定价 在分析计算引擎的目录api响应时,我们发现sku对象中没有任何准确的参数,除了描述之外,我们可以使用这些参数识别机器类型(N14标准、NIHighmem 16等) 除了解析描述之外,是否有任何解决方法可以直接获取具有特定数量内核的sku对象 是否有任何解决方法可以直接获取特定实例名称的sku对象 例如:n116标准 以下是具有8个核心的N1Highcpu的sku对象示例,其中核心数量仅在说明中提及: {
计算引擎
的目录api响应时,我们发现sku对象中没有任何准确的参数,除了描述之外,我们可以使用这些参数识别机器类型(N14标准、NIHighmem 16等)
除了解析描述之外,是否有任何解决方法可以直接获取具有特定数量内核的sku对象
是否有任何解决方法可以直接获取特定实例名称的sku对象
例如:n116标准
以下是具有8个核心的N1Highcpu的sku对象示例,其中核心数量仅在说明中提及:
{
"name": "services/<<id>>/skus/C216-207D-0521",
"skuId": "C216-207D-0521",
"description": "Highcpu Intel N1 8 VCPU running in Netherlands",
"category": {
"serviceDisplayName": "Compute Engine",
"resourceFamily": "Compute",
"resourceGroup": "N1Highcpu",
"usageType": "OnDemand"
},
"serviceRegions": [
"europe-west4"
],
"pricingInfo": [
{
"summary": "",
"pricingExpression": {
"usageUnit": "h",
"usageUnitDescription": "hour",
"baseUnit": "s",
"baseUnitDescription": "second",
"baseUnitConversionFactor": 3600,
"displayQuantity": 1,
"tieredRates": [
{
"startUsageAmount": 0,
"unitPrice": {
"currencyCode": "USD",
"units": "0",
"nanos": 312400000
}
}
]
},
"currencyConversionRate": 1,
"effectiveTime": "2018-05-17T08:22:54.236Z"
}
],
"serviceProviderName": "Google"
}
{
“名称”:“服务//SKU/C216-207D-0521”,
“臭鼬”:“C216-207D-0521”,
“说明”:“在荷兰运行的高CPU Intel N1 8 VCPU”,
“类别”:{
“serviceDisplayName”:“计算引擎”,
“resourceFamily”:“Compute”,
“资源组”:“N1Highcpu”,
“usageType”:“OnDemand”
},
“服务区域”:[
“欧洲西部4”
],
“pricingInfo”:[
{
“摘要”:“摘要”,
“PricingeExpression”:{
“使用单位”:“h”,
“usageUnitDescription”:“小时”,
“基本单位”:“s”,
“baseUnitDescription”:“第二个”,
“baseUnitConversionFactor”:3600,
“显示数量”:1,
“分层费率”:[
{
“startUsageAmount”:0,
“单价”:{
“货币代码”:“美元”,
“单位”:“0”,
“纳米”:312400000
}
}
]
},
“货币兑换率”:1,
“有效时间”:“2018-05-17T08:22:54.236Z”
}
],
“serviceProviderName”:“谷歌”
}
您需要的功能尚未在云计费目录API上实现
目前唯一的解决办法是解析输出以获得计算引擎实例的SKU。因此,请跟进功能请求 到2020年,仍然无法获得计算引擎机器类型的定价信息。那太疯狂了。唯一的问题是https://console.cloud.google.com/m/price_list?folder&organizationId