IWsEndUserGetPurchasedIpAddresses 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]
WsResult<IPAddress[]> GetPurchasedIpAddresses()
<OperationContractAttribute>
Function GetPurchasedIpAddresses As WsResult(Of IPAddress())
[OperationContractAttribute]
WsResult<array<IPAddress^>^>^ GetPurchasedIpAddresses()
[<OperationContractAttribute>]
abstract GetPurchasedIpAddresses : unit -> WsResult<IPAddress[]>
function GetPurchasedIpAddresses() : WsResult<IPAddress[]>
Return Value
Type:
WsResultIPAddress
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 static void Test_wsEndUser_GetPurchasedIPAddresses()
{
using (var client = new WsEndUser.WsEndUserClient())
{
client.ClientCredentials.UserName.UserName = ARU_0000;
client.ClientCredentials.UserName.Password = ARU_PSW;
try
{
WsResultOfArrayOfIPAddress result = client.GetPurchasedIpAddresses();
if (result.Success)
{
var res = result.Value.ToList();
foreach(var r in res)
{
Console.WriteLine(r.Value);
}
}
}
catch (Exception ex)
{
throw new ApplicationException(String.Format(
"An error has occurred while retrieving purchased IPAddress. {0}", ex.Message));
}
}
}
See Also