Click or drag to resize

IJsonpWsEndUserGetPurchasedIpAddresses Method

Get a list of IpAddress purchased and associated with the account indicated. Using the method GetPurchasedIpAddresses() WsEndUser of Aruba, you can get a list of objects of class IPAddress representing the IP addresses associated with your purchase and then specify in the authentication phase. IPAddress objects thus obtained allow to see the main features of the IP addresses obtained from: mainly the resource name, its identification code (ID) and the code of the server to which the VLAN is associated.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
[WebGetAttribute(ResponseFormat = WebMessageFormat.Json, UriTemplate = "GetPurchasedIpAddresses/{jsonp}/{userName}/{token}")]
Stream GetPurchasedIpAddresses(
	string jsonp,
	string userName,
	string token
)

Parameters

jsonp
Type: SystemString
userName
Type: SystemString
token
Type: SystemString

Return Value

Type: Stream
The method returns an object WsResult<IPAddress[]> contains information about IPAddress purchased. For further details on the information returned by the method see the class definition WsResult and class IPAddress.
Examples
The following example describes a method, called TestGetPurchasedIPAddresses(), which via a call to GetPurchasedIPAddress() to Aruba WsEndUser, get a list of objects calss VLAN.

In the example, as a result of the method call GetPurchasedIPAddresses () is a valued object variable of List <IPAddress[]> that will go to hold all the objects IPAddress purchased and returned by the method.

private List<IPAddress>GetPurchasedIpAddresses()
{
  List<IPAddress> listOfPurchasedIPAddreses = new List<IPAddress>();

  try
  {
    WsResultOfArrayOfIPAddress result = client.GetPurchasedIpAddresses();

    if (result.Success)
    {
        //stores the IPs obtained from the Aruba WsEndUser method in the 'listOfPurchasedIPAddresses' list
        listOfPurchasedIPAddresses = result.Value.ToList<IPAddress>();
    }
  }
  catch (Exception ex)
  {              
      throw new ApplicationException(String.Format(
        "An error has occurred while retrieving purchased IPAddress. {0}", ex.Message));
  }

  return listOfPurchasedIPAddresses;
}
See Also