我们的要求是在3个不同的vlan中拥有5个虚拟机。在https://control.softlayer.com/network/vlans,我看不到创建私人vlans的选项。 我想知道有没有办法使用SL API创建多个私人vlan?
答案 0 :(得分:0)
这是订购REST
的{{1}}请求:
private Vlan
方法:POST Json Payload:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Product_Order/verifyOrder
注意:强>
要执行此请求,请删除评论.e.g。 #CONTACT_PHONE_NUMBER,#CONTACT_VALIDATED,#TOTAL_IPS_IN_12_MONTHS,#TOTAL_IPS_IN_30_DAYS。
当您的所有配置准备就绪后,请从{
"parameters": [
{
"location": "AMSTERDAM",
"packageId": 0,
"prices": [
{
"id": 50745 # Private Network Vlan
},
{
"id": 36696 # 8 Static Public IP Addresses
}
],
"quantity": 1,
"name": "myNewVlan",
"complexType": "SoftLayer_Container_Product_Order_Network_Vlan",
"itemCategoryQuestionAnswers": [
{
"categoryId": 53,
"categoryCode": "static_sec_ip_addresses",
"questionId": 14,
"answer": 4 # TOTAL_IPS_IN_30_DAYS
},
{
"categoryId": 53,
"categoryCode": "static_sec_ip_addresses",
"questionId": 15,
"answer": 4 # TOTAL_IPS_IN_12_MONTHS
},
{
"categoryId": 53,
"categoryCode": "static_sec_ip_addresses",
"questionId": 16,
"answer": "Description of your need for additional IPs"
},
{
"categoryId": 53,
"categoryCode": "static_sec_ip_addresses",
"questionId": 9,
"answer": "Contact name"
},
{
"categoryId": 53,
"categoryCode": "static_sec_ip_addresses",
"questionId": 10,
"answer": "Contact job title"
},
{
"categoryId": 53,
"categoryCode": "static_sec_ip_addresses",
"questionId": 11,
"answer": "qe.testing.qe@gmail.com"
},
{
"categoryId": 53,
"categoryCode": "static_sec_ip_addresses",
"questionId": 12,
"answer": "72578789" # CONTACT_PHONE_NUMBER
},
{
"categoryId": 53,
"categoryCode": "static_sec_ip_addresses",
"questionId": 13,
"answer": true # CONTACT_VALIDATED
}
]
}
]
}
更改为“placeOrder”。
要获得verifyOrder
,请执行:
valid item prices
如果您想创建多个项目,可以使用SoftLayer创建的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]]]
Method: GET
:SoftLayer Api Clients
<强>参考文献:强>
SoftLayer_Product_Order::placeOrder
SoftLayer_Product_Order::verifyOrder