ibm-cloud-infrastructure - SoftLayer_Location/getDatacenters API 对不同数据中心的响应不一致
问题描述
SoftLayer_Location getDatacenter API 及其对Dallas 09和San Jose 04数据中心的响应粘贴在下面:
https://api.softlayer.com/rest/v3.1/SoftLayer_Location/getDatacenters.json?objectFilter={"name":{"operation":"dal09"}}&objectMask=mask[groups]
[{
"id": 449494,
"longName": "Dallas 9",
"name": "dal09",
"statusId": 2,
"groups": [{
"description": "All Datacenters in the USA",
"id": 1,
"locationGroupTypeId": 1,
"name": "US",
"securityLevelId": null,
"locationGroupType": {
"name": "VDR"
}
}, {
"description": "na-usa-central-1",
"id": 22,
"locationGroupTypeId": 42,
"name": "na-usa-central-1",
"securityLevelId": null,
"locationGroupType": {
"name": "REGIONAL"
}
}, {
"description": "COS Cross Region - US",
"id": 1307,
"locationGroupTypeId": 82,
"name": "us",
"securityLevelId": null,
"locationGroupType": {
"name": "PRICING"
}
}]
}]
https://api.softlayer.com/rest/v3.1/SoftLayer_Location/getDatacenters.json?objectFilter= {"name":{"operation":"sjc04"}}&objectMask=mask[groups]
[{
"id": 2178495,
"longName": "San Jose 4",
"name": "sjc04",
"statusId": 2,
"groups": [{
"description": "All Datacenters in the USA",
"id": 1,
"locationGroupTypeId": 1,
"name": "US",
"securityLevelId": null,
"locationGroupType": {
"name": "VDR"
}
}, {
"description": "na-usa-west-2",
"id": 64,
"locationGroupTypeId": 42,
"name": "na-usa-west-2",
"securityLevelId": null,
"locationGroupType": {
"name": "REGIONAL"
}
}]
}]
正如我们所见,这"locationGroupType": {"name": "PRICING"}
不是San Jose 04数据中心响应的一部分。华盛顿数据中心也出现了这种情况。
这是我们用来获取与locationGroupId相关的定价的过滤器。但由于此属性不适用于某些数据中心,我们的代码无法获取这些数据中心的定价。这是预期的还是 API 中的某些内容已更改
也提到了Softlayer API 验证订单失败问题,但是在 SoftLayer_Product_Package 的 getItems API 调用中没有看到定价位置组属性。
解决方案
推荐阅读
- python - 使用 resample 和 groupby 应用函数时出现 Pandas 错误
- sql - 获取一周的第一天 T-SQL
- python - 如何遍历日期列并根据特定条件分配值?
- c# - 为什么我有 ArgumentOutOfRangeException 错误?
- config - Readium js 查看器配置语言
- java - 关于缺少 javax/mail/mail/1.4/activation.jar 的 Maven 编译错误。怎么修?
- python - 如何在嵌套列表 Python 中连接两个列表?
- r - 如果行包含 R 中同一变量的两个值,则转置数据帧
- android - 我想创建一个带有两个不同部分的背景布局,上部将有不同的背景颜色,底部将有不同的
- stripe-payments - 为未来日期创建订阅