Click or drag to resize

IWsEndUserGetAdditionalIPServices Method

This method allows to recover Additional IP Services for Pre Configured Packages

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<List<NetworkResourceProducts>> GetAdditionalIPServices(
	GetPreConfiguredPackagesRequest request
)

Parameters

request
Type: Aruba.Cloud.Provisioning.Entities.SmartVMWareGetPreConfiguredPackagesRequest

Return Value

Type: WsResultListNetworkResourceProducts
Examples
                private static void Test_wsEndUser_GetAdditionalIPServices()
{
    using (var client = new WsEndUser.WsEndUserClient())
    {
        client.ClientCredentials.UserName.UserName = ARU_0000;
        client.ClientCredentials.UserName.Password = ARU_PSW;
        try
        {
            WsResultOfArrayOfNetworkResourceProducts result = client.GetAdditionalIPServices(new GetPreConfiguredPackagesRequestEntity()
            {
                HypervisorType = HypervisorTypes.OpenStackVPSLowCost
            });

            if (result.Success)
            {
                //memorizza nella lista di IPAddress gli IP virtuali ottenuti dal metodo di Aruba WsEndUser
                var res = result.Value;
                StringBuilder sb = new StringBuilder();

                sb.AppendLine("");
                sb.AppendLine("Additional IP Services: ");
                foreach (var pi in res)
                {
                    sb.AppendLine("Product ID: " + pi.ProductInfo.ProductID);
                    sb.AppendLine("- IP Type: " + pi.PublicIPType);
                    sb.AppendLine("- Billing Type: " + pi.ProductInfo.BillingType);
                    sb.AppendLine("- Price: " + pi.ProductInfo.Price);
                }
                Console.WriteLine(sb.ToString());
            }
        }
        catch (Exception ex)
        {
            //rilancia l'errore
            throw new ApplicationException(String.Format(
              "An error has occurred while retrieving GetAdditionalIPServices. {0}", ex.Message));
        }
    }
}
See Also