SoftLayer Evault验证API错误

时间:2017-08-29 10:51:51

标签: api ibm-cloud backup storage ibm-cloud-infrastructure

我通过JAVA API控制软件层资源(服务器,存储等)。

我正在通过API验证升级到Evault存储空间(20GB => 40GB),但API返回错误消息

"error": "EVault service already exists for the requested location (Seoul 1).",
        "code": "SoftLayer_Exception_Public"
来自POST事件的

URL(POST) https://IBMxxxx:xxxxx@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder.json

以下是附加的请求正文

{"parameters":
    [
        {"complexType":"SoftLayer_Container_Product_Order"
        ,"orderContainers":[
                            {"complexType":"SoftLayer_Container_Product_Order_Network_Storage_Backup_Evault_Vault"
                                ,"location":"1555995"
                                ,"packageId":0
                                ,"quantity":1
                                ,"virtualGuests":[
                                                    {"complexType":"SoftLayer_Virtual_Guest"
                                                        ,"id":376047
                                                    }
                                                ],
                                "useHourlyPricing":false
                                ,"prices":[
                                            {"complexType":"SoftLayer_Product_Item_Price","id":66257}
                                        ]
                            }
                            ]
        }
    ]
}

1 个答案:

答案 0 :(得分:0)

您正在使用该请求执行的操作是订购eVault存储,此外itemId设置的容量为 60GB EVault Disk ,而不是40 Gb。

更新

仅检索eVault存储容量的项目价格。

https://IBMxxxx:xxxxx@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/0/getItemPrices?objectMask=mask[id,locationGroupId,item[id,keyName,description],pricingLocationGroup[locations[id,name,longName]]]&objectFilter={"itemPrices":{"item": {"keyName":{"operation":"*=EVAULT"}}}}

目前要执行升级所需的是使用SoftLayer :: upgradeVolumeCapacity方法,请参阅以下请求:

执行到特定eVault存储的容量升级:

(url POST) https://IBMxxxx:xxxxx@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/eVaultId/upgradeVolumeCapacity

带有以下请求BODY:

 {
   "parameters":   
   [     
         559            
   ]
 }

请勿忘记更改eVault存储请求中的 eVaultId ,请尝试此休息请求以检索特定的eVault ID:

检索帐户的关联EVault存储卷:

https://IBMxxxx:xxxxx@api.softlayer.com/rest/v3/SoftLayer_Account/getEvaultNetworkStorage?objectMask=mask[id, serviceResourceName,guestId,billingItem[id,location]] 

获得后,您可以指定upgradeItem(例如“itemId”:559 ,可能是40 Gb evault磁盘的 itemId )。

检索升级项目ID 以获取允许的不同升级容量,请使用以下请求:

https://IBMxxxx:xxxxx@api.softlayer.com/rest/v3/SoftLayer_Network_Storage/eVaultId/getObject?objectMask=mask[id, billingItem[id, upgradeItems[prices]]]

(别忘了更改eVaultId)。

查看upgradeItems属性并选择所需的容量,您应该使用 id 值来获取方法upgradeVolumeCapacity所需的容量。

有关eVaults的更多信息,请参阅以下内容:

Sample code to handle the upgrade of EVault?

How to find location of an EVault using SoftLayer API?

Sample code for ordering an EVault backup in SoftLayer