unable to find softLayer api to cancel the primary vlans

51 Views Asked by At

I want to cancel the public/private vlans which comes with server ordering.

Please share softlayer api for cancellation of primary vlans ?

1

There are 1 best solutions below

0
On BEST ANSWER

Vlan purchased

If you purchased the vlan, it's necessary to cancel servers inside of this and then you can proceed to cancel the vlan through its billingItem, the requests that will help with that:

To get information from vlans and their billing items

https://$user:[email protected]/rest/v3.1/SoftLayer_Account/getNetworkVlans?objectMask=mask[billingItem.id]

Method: Get

To cancel vlan billind item

Once you get the vlan's billing item identifier, you can use this request:

https://$user:[email protected]/rest/v3.1/SoftLayer_Billing_Item_Cancellation_Request/createObject

Method: Post

{  
   "parameters":[  
      {  
         "accountId":123123,
         "items":[  
            {  
               "billingItemId":101726027,
               "immediateCancellationFlag":true
            }
         ]
      }
   ]
}

Replace: 123123 with your accountId and 101726027 with the vlan's billing item identifier


Vlan provided by SoftLayer

If the vlans for your server was provided by SoftLayer, they will be removed when the server is already cancelled, so you just need to cancel the server.