Click or drag to resize

IWsBackupGetSubscribers Method

Get subcribers of a backup

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<List<Subscribers>> GetSubscribers(
	int backupAccountID
)

Parameters

backupAccountID
Type: SystemInt32
Backup Account Identifier

Return Value

Type: WsResultListSubscribers
Examples
By the method IWsBackup GetSubscribers you can Get list of all subscribers of the backupaccount associated with the authenticated user
/// WsBackupClient.GetSubscribers    Method (c# .NET)
public static string GetSubscribers(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 GetBackupAccount
// obtaining a WsResultOfArrayOfSubscribers item
WsResultOfArrayOfSubscribers result = client.GetSubscribers(backupAccountID);

// if the call is Success print returned values
if (result.Success)
{
stringBuilder.Append("Operation ends successfully\n");

// get Value returned from server
Subscribers[] items = result.Value;
if (items != null)
{
foreach (Subscribers item in items)
{
stringBuilder.Append("\n Subscriber detail\n");
stringBuilder.Append("\n Type: ");
stringBuilder.Append(item.Type);
stringBuilder.Append("\n AddressValue: ");
stringBuilder.Append(item.AddressValue);
}
}

}
else
{
throw new ApplicationException(result.ResultMessage);
}
}
catch (Exception ex)
{
// re-run the error
throw new ApplicationException(ex.Message);
}

return stringBuilder.ToString();
}
See Also