Click or drag to resize

IWsBackupGetBackupUserSummary Method

Get summary information for the backup aspect of the authenticated user (number of backup accounts, total space used, etc.).

Namespace:  Aruba.Cloud.WsBackup
Assembly:  Aruba.Cloud.WsBackup (in Aruba.Cloud.WsBackup.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<BackupUserSummary> GetBackupUserSummary()

Return Value

Type: WsResultBackupUserSummary
backup summary (number of backup accounts, total space used, etc.)
Examples
By the method IWsBackup GetBackupAccount you can Get summary information for the backup aspect of the authenticated user (number of backup accounts, total space used, etc.).
/// 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();
}
See Also