IWsEndUserGetPurchasedVLans Method |
Get a list of VLANs and associated purchased from your set.
Using the method GetPurchasedVLans() WsEndUser of Aruba, you can get a list of class objects that represent virtual LAN VLAN purchased and then associated with the account specified in the authentication phase. VLAN objects thus obtained allow to see the main features of VLAN purchased: mainly the resource name, its identification code (ID) and the code of the server to which the VLAN is associated.
Namespace: Aruba.Cloud.WsEndUser
In the example, as a result of the method call GetPurchasedVLans() is a valued object variable of List <VLan[]> that will go to hold all the objects VLAN purchased and returned by the method.
private List<VLan>TestGetPurchasedVLans() { List<VLan> listOfPurchasedVlan = new List<VLan>(); try { WsResultOfArrayOfVLan result = client.GetPurchasedVLans(); if (result.Success) listOfPurchasedVlan = result.Value.ToList<VLan>(); } catch (Exception ex) { throw new ApplicationException(String.Format( "An error has occurred while retrieving purchased VLans. {0}", ex.Message)); } return listOfPurchasedVlan; }