IWsBackupGetBackupAccountServers Method |
Note: This API is now obsolete.
Namespace: Aruba.Cloud.WsBackup
[OperationContractAttribute] [ObsoleteAttribute("This Method is deprecated")] WsResult<List<BackupServer>> GetBackupAccountServers( int backupAccountId )
/// WsBackupClient.GetBackupAccountServers Method (c# .NET) public static string GetBackupAccountServers(WsBackupClient client, int backupAccountId) { //specify the account login details client.ClientCredentials.UserName.UserName = "ARU-0000"; client.ClientCredentials.UserName.Password = "0123456789"; StringBuilder stringBuilder = new StringBuilder(); try { // call method GetBackupAccountServers // obtaining a WsResultOfArrayOfBackupServer item WsResultOfArrayOfBackupServer result = client.GetBackupAccountServers(backupAccountId); // if the call is Success print returned values if (result.Success) { stringBuilder.Append("Operation ends successfully\n"); // get Value returned from server BackupServer[] items = result.Value; if (items != null) { foreach (BackupServer item in items) { stringBuilder.Append("\nBackupServer detail\n"); stringBuilder.Append("\n ID: "); stringBuilder.Append(item.ID); stringBuilder.Append("\n DataCenterID: "); stringBuilder.Append(item.DataCenterID); stringBuilder.Append("\n IPAddress: "); stringBuilder.Append(item.IPAddress); stringBuilder.Append("\n ServerName: "); stringBuilder.Append(item.ServerName); } } } else { throw new ApplicationException(result.ResultMessage); } } catch (Exception ex) { // re-run the error throw new ApplicationException(ex.Message); } return stringBuilder.ToString(); }