如何使用SoftLayer API查找EVault的位置? [英] How to find location of an EVault using SoftLayer API?

查看:59
本文介绍了如何使用SoftLayer API查找EVault的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到有一个SoftLayer_Account :: getEvaultNetworkStorage()来获取我的EVault存储的列表.但是,使用我所拥有的信息,我无法确定特定EVault的位置. 以下是我从getEvaultNetworkStorage()获得的信息类型:

I see there is SoftLayer_Account::getEvaultNetworkStorage() to get a list of my EVault storages. However, using the information that I have, I cannot figure out the location of a particular EVault. Below is the type of information I get from getEvaultNetworkStorage():

   {
      "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"
   },

我也看不到要设置的其他任何有用的对象过滤器.

I don't see any other useful Object Filter to set either.

使用SoftLayer_Network_Storage_Backup_Evault :: getObject()可以提供相同类型的信息,并且没有API可以为我提供位置信息. 而且我需要位置ID才能以编程方式订购EVault插件.

Using SoftLayer_Network_Storage_Backup_Evault::getObject() gives same type of information and there are no APIs that gives me the location information. And I need the location ID in order to order an EVault plugin programmatically.

有什么想法吗?

推荐答案

尝试以下操作以使用掩码获取Evault位置:

Try the following to get the Evault location using masks:

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订单的有效位置,建议您使用以下请求:

Also, to get valid locations for Evault orders, I suggest you to use the following request:

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的价格ID被视为标准价格",API会在内部为客户切换价格.但是我们建议先执行verifyOrder,以查看所需的订单是否正常(费用可能会有所不同).

Note: A price id with a locationGroupId = null is considered as "a standard price" and the API will internally switch the prices for the customer. But we recommend first to execute first the verifyOrder in order to see if the wanted order is ok (the fee can vary).

要获取有关价格和位置的更多信息,请查看:

To get more information about prices and locations, please review:

http://sldn.softlayer.com/blog/cmporter/基于位置的定价和您

参考:

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

希望这些信息对您有所帮助.

I hope this information help you.

这篇关于如何使用SoftLayer API查找EVault的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆