首页 > 解决方案 > How to order a Public and Private Vlan using Softlayer API

问题描述

I want to order a Public and Private Vlan using Rest API. I didn't find any API references related to Vlan creation.

标签: javaapiibm-cloud-infrastructure

解决方案


尝试使用以下示例:

EG 订购专用 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"   
  }]}

订购公共 VLAN 与订购私有 VLAN 相同,只是您需要查找公共 VLAN 项目价格。

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

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

方法:获取

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

推荐阅读