Click or drag to resize

IWsBackupSetCreateBackupAccount Method

Create new backup account.

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 SetCreateBackupAccount(
	BackupAccountToCreate account
)

Parameters

account
Type: Aruba.Cloud.WsBackup.EntitiesBackupAccountToCreate
backup account to create

Return Value

Type: WsResult
Examples
By the method IWsBackup SetCreateBackupAccount you can Create new backup account. This includes creating a BackupAccount business object /// and saving it into database, and creating EVault structure for the backup account (Customer, Location, Account, User)
/// WsBackupClient.SetCreateBackupAccount    Method (c# .NET)
public static string SetCreateBackupAccount(WsBackupClient client,
    BackupAccountToCreate account)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {

        // call method WsResult  
        // obtaining a SetCreateBackupAccount item
        WsResult result = client.SetCreateBackupAccount(account);

        // if the call is Success print returned values
        if (result.Success)
        {
            stringBuilder.Append("Operation ends successfully\n");                   
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        // re-run the error
        throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
See Also