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 verify order fail问题,但是在SoftLayer_Product_Package的getItems API调用中未看到priceingLocationGroup属性。