2016-01-06 28 views
0

我看到有SoftLayer_Account :: getEvaultNetworkStorage()來獲取我的EVault存儲列表。但是,使用我擁有的信息,我無法弄清某個特定EVault的位置。 下面是我的信息從getEvaultNetworkStorage(領)類型:如何使用SoftLayer API查找EVault的位置?

{ 
     "accountId" : 7xxx, 
     "capacityGb" : 30, 
     "createDate" : "2016-xxx", 
     "guestId" : 14xxx, 
     "hardwareId" : null, 
     "hostId" : 14xxx, 
     "id" : 83xxx, 
     "nasType" : "EVAULT", 
     "password" : "Bxxx", 
     "serviceProviderId" : 1, 
     "serviceResourceBackendIpAddress" : "ev-xxx.service.softlayer.com", 
     "serviceResourceName" : "ev-xxx.service.softlayer.com", 
     "storageTypeId" : "19", 
     "upgradableFlag" : true, 
     "username" : "IBMxxx" 
    }, 

我沒有看到任何其他有用的對象過濾器設置無論是。

使用SoftLayer_Network_Storage_Backup_Evault :: getObject()會提供相同類型的信息,並且沒有給出位置信息的API。 我需要位置ID才能以編程方式訂購EVault插件。

任何想法?

回答

1

請嘗試以下使用口罩,以獲得EVault的位置:

Option 1: 

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

Method: GET 

Option 2: 

https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Network_Storage_Backup_Evault/[Evault_id]/getObject?objectMask=mask[billingItem[id,location]] 

Method: GET 

同時,爲了有效位置爲EVault公司的訂單,我建議您使用以下請求:

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

Method: GET 

注意:具有locationGroupId = null的價格標識被認爲是「標準價格」,並且API將內部切換顧客的價格。但我們建議首先執行verifyOrder,以查看所需訂單是否正常(費用可能會有所不同)。

要了解有關價格和位置的詳細信息,請參閱:

http://sldn.softlayer.com/blog/cmporter/Location-based-Pricing-and-You

參考文獻:

http://sldn.softlayer.com/reference/services/SoftLayer_Product_Package/getItemPrices

我希望這些信息對您有幫助。

+0

啊,它是具有位置信息的billingItem。謝謝! – KHP

+0

@KHP,不客氣:)。如果有幫助,請投票表決。謝謝 – mcruz

相關問題