如何使用 Softlayer API 订购 Public 和专用 Vlan

How to order a Public and Private Vlan using Softlayer API

我想订购 Public 和 Private Vlan using Rest API。我没有找到任何 API 与 Vlan 创建相关的参考资料。

尝试使用以下示例:

E.G 订购专用 VLAN:

方法:POST

https://[username]:apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder

正文

{  "parameters":[{  
           "complexType":"SoftLayer_Container_Product_Order_Network_Vlan",
           "location":"DALLAS05",
           "quantity":1,
           "packageId":571,
           "prices":[{  
                 "id":  2019,
                 "item":{
                    "id":1072,
                    "keyName" :"PRIVATE_NETWORK_VLAN"}
                    }],
            "name":"testVlan"   
  }]}

订购 public VLAN 与订购专用 VLAN 相同,只是您需要寻找 public VLAN 商品价格。

请记住,您必须根据所选数据中心选择项目。

要获取商品价格,请使用以下 REST API 调用。

方法:获取

https://[username]:apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/571/getItemPrices?maskObject=mask[pricingLocationGroup[locations]]