我可以指定用于创建虚拟服务器的软层API的带宽吗? [英] Can I specify bandwidth to soft layer API for creating a virtual server?
本文介绍了我可以指定用于创建虚拟服务器的软层API的带宽吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试通过软层API创建虚拟服务器.但是我遇到的API似乎不接受网络带宽,我不能为通过API创建的虚拟服务器指定所需的带宽吗?
I am trying to create a virtual server through soft layer API. But the API I came across don't seem to accept network bandwidth, can't I specify the required bandwidth for my virtual server created through API?
谢谢, Kishore
Thanks, Kishore
推荐答案
Anyway, here an example using SoftLayer_Product_Order::placeOrder method to place an order for VSI with bandwidth:
https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
Method: Post
{
"parameters":[
{
"location":449494,
"packageId":46,
"hardware":[
{
"domain":"softlayer.com",
"hostname":"test"
}
],
"prices":[
{
"id":1640
},
{
"id":1644
},
{
"id":13940
},
{
"id":2202
},
{
"id":50241
},
{
"id":273
},
{
"id":2302
},
{
"id":55
},
{
"id":58
},
{
"id":420
},
{
"id":418
},
{
"id":21
},
{
"id":57
},
{
"id":905
},
{
"id":14022
}
]
}
]
}
"50241"价格是指"5000 GB带宽"
The "50241" price refers to "5000 GB Bandwidth"
要获取有关商品价格的信息,请尝试以下操作:
To retrieve information about item prices, try this:
https://$user:$apiKey@api.softlayer.com/rest/v3/SoftLayer_Product_Package/46/getItemPrices
Method: Get
参考:
SoftLayer_Product_Package :: getItemPrices
这篇关于我可以指定用于创建虚拟服务器的软层API的带宽吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文