Softlayer Evault价格ID [英] Softlayer Evault Price Ids

查看:36
本文介绍了Softlayer Evault价格ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用soflayer API以编程方式创建evault备份.除了如何获取我们所需的evault备份大小的价格ID之外,我拥有所有我需要的东西.我该如何动态地执行此操作,或者如果不可用,那么如何仅执行evault存储大小的价格ID列表?

I am trying to create an evault backup programmatically using soflayer API. I have everything I need except for how to obtain the price id for the evault backup size we need. How can I do that dynamically, or if its not available, just the list of price ids for evault storage sizes?

我已经查看了文档,并联系了他们建议使用Softlayer标签的支持.

Ive already looked in documentation and also contacted support which they suggested SO with Softlayer tag.

推荐答案

快速查看,也许可以通过服务器数据中心使用对象过滤器进行操作:

A quick view, perhaps using an object filter through the server's datacenter could work:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Package/0/getItemPrices?objectMask=mask[categories, pricingLocationGroup[locations]]&objectFilter={"itemPrices":{"categories":{"categoryCode":{"operation":"evault"}}, "pricingLocationGroup":{"locations":{"name":{"operation":"sao01"}}}}}

Method: Get

替换:将"sao01"替换为您希望订购evault的服务器的数据中心名称.如果它不返回任何响应

Replace: "sao01" with the server's datacenter name that you wish to order an evault. In case that it doesn't return any response

已更新

抱歉,我们应该知道价格是根据地点而定,请参阅下面的文章以获取有关此信息的更多信息:

My apologies, we should know that the prices are based on the locations, see the below article to get more information about it:

以下休息请求将帮助您基于以下价格获得数据中心的标准价格:

The below rest request, will help you to get standard prices for datacenters based on these kind of prices:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Package/0/getItemPrices?objectMask=mask[categories, pricingLocationGroup[locations]]&objectFilter={"itemPrices":{"categories":{"categoryCode":{"operation":"evault"}}, "locationGroupId":{"operation":"is null"}}}

Method: Get

此外,我可以提供一个休息请求,以根据标准或位置价格确定哪个数据中心:

Also, I can provide a rest request to identify which datacenter is based on standard or location prices:

https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Location/getDatacenters?objectMask=mask[priceGroups]

Method: Get

标准价格应应用于不具有"priceGroups"属性/信息的数据中心,对于其他数据中心(具有priceGroups),则应使用我提供的第一个请求.

The standard prices should be applied for the datacenters which don't have "priceGroups" property/information, for the other datacenters (which have priceGroups), you should use the first request that I provided.

这篇关于Softlayer Evault价格ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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