IWsEndUserGetPurchasedPrivateClouds Method |
Namespace: Aruba.Cloud.WsEndUser
[OperationContractAttribute] WsResult<PrivateCloudEntities> GetPurchasedPrivateClouds()
/// IWsEndUser.GetPurchsedPrivateClouds Method (c# .NET) public static string GetPurchsedPrivateClouds(WsEndUserClient client) { //specify the account login details client.ClientCredentials.UserName.UserName = "ARU-0000"; client.ClientCredentials.UserName.Password = "0123456789"; StringBuilder stringBuilder = new StringBuilder(); try { // call method GetPurchasedPrivateClouds // obtaining a WsResultOfPrivateCloudEntities item WsResultOfPrivateCloudEntities result = client.GetPurchasedPrivateClouds(); // if the call is Success print returned values if (result.Success) { stringBuilder.Append("Operation ends successfully\n"); // get Value returned from server PrivateCloudEntities items = result.Value; // for each items print the information foreach (PrivateCloudEntity item in items.PrivateClouds) { stringBuilder.Append("\nPrivateCloudID: "); stringBuilder.Append(item.PrivateCloudID); stringBuilder.Append("\nName: "); stringBuilder.Append(item.Name); stringBuilder.Append("\nStatus: "); stringBuilder.Append(item.Status); } } else { throw new ApplicationException(result.ResultMessage); } } catch (Exception ex) { // re-run the error throw new ApplicationException(ex.Message); } return stringBuilder.ToString(); }