IWsBackupGetBackupUserSummary Method |
Namespace: Aruba.Cloud.WsBackup
/// WsBackupClient.GetBackupUserSummary Method (c# .NET) public static string GetBackupUserSummary(WsBackupClient client) { //specify the account login details client.ClientCredentials.UserName.UserName = "ARU-0000"; client.ClientCredentials.UserName.Password = "0123456789"; StringBuilder stringBuilder = new StringBuilder(); try { // call method GetBackupAccount // obtaining a WsResultOfBackupUserSummary item WsResultOfBackupUserSummary result = client.GetBackupUserSummary(); // if the call is Success print returned values if (result.Success) { stringBuilder.Append("Operation ends successfully\n"); // get Value returned from server BackupUserSummary item = result.Value; stringBuilder.Append("\n BackupAccount summary \n"); stringBuilder.Append("\n UserAccountsNumber: "); stringBuilder.Append(item.UserAccountsNumber); stringBuilder.Append("\n UsedSpace: "); stringBuilder.Append(item.UsedSpace); } else { throw new ApplicationException(result.ResultMessage); } } catch (Exception ex) { // re-run the error throw new ApplicationException(ex.Message); } return stringBuilder.ToString(); }