Softlayer API:异常为此订单提供的位置无效 [英] Softlayer api: exception The location provided for this order is invalid

查看:71
本文介绍了Softlayer API:异常为此订单提供的位置无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用sl_product_order.placeOrder api订购vsi.订单参数:

Use sl_product_order.placeOrder api to order a vsi. Order params:

{'prices': [{'id': 1644}, {'id': 1640}, {'id': 2202}, {'id': 272}, {'id': 45466}, {'id': 905}, {'id': 21}, {'id': 57}, {'id': 55}, {'id': 58}, {'id': 420}, {'id': 418}, {'id': 17129}, {'id': 1800}], 'location': '224092', 'packageId': 835, 'complexType': 'SoftLayer_Container_Product_Order_Virtual_Guest', 'useHourlyPricing': True, 'virtualGuests': [{'domain': 'xxx.com', 'hostname': 'xxx-rkgw77q5'}], 'quantity': 1}

数据中心":"sng01" ID:224092

'dataCenter': 'sng01' id:224092

SoftLayerAPIError(SoftLayer_Exception_Order_InvalidLocation):为此订单提供的位置无效.

SoftLayerAPIError(SoftLayer_Exception_Order_InvalidLocation): The location provided for this order is invalid.

昨天,此api可以正常创建具有相同参数的vsi.但是,现在不起作用.

Yesterday, this api works ok for create a vsi with the same params. But, now it does not works.

我可以在门户网站上购买sng01的vsi.但是api总是告诉此订单提供的位置无效.

I can buy vsi of sng01 in portal website. But the api always tells The location provided for this order is invalid.

推荐答案

在订购之前,您需要确保要使用的程序包可以在您要使用的位置工作,以检查是否必须运行此程序方法:

Before ordering you need to make sure that the package that you are going to use works for the location that you want to use, to check that you must run this method:

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

当前您使用的软件包的位置sng01没有有效,这就是您收到错误消息的原因.

Currently the package that you are using does not have the location sng01 as valid that's why you are getting the error.

另一方面,您可以使用控制门户网站在该区域订购,因为控制门户网站针对虚拟服务器使用了另一个软件包,它使用的是软件包46,因此您需要更改订单中的软件包,也可能更改价格还有,因为每个包裹都有自己的价格.

In another hand you are able to order in that region using the control portal because the control portal uses another package for virtuall servers, it is using the package 46, So you need to change the package in your order and maybe the prices as well because each package has its own prices.

这篇关于Softlayer API:异常为此订单提供的位置无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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