Click or drag to resize

IWsBackupSetResetBackupAccountPassword Method

Resets password (generates new random password and changes the old one) for the backup account. New password is sent to the contact e-mail of the authenticated user which the backup account belongs to.

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 SetResetBackupAccountPassword(
	int backupAccountID
)

Parameters

backupAccountID
Type: SystemInt32
ID of backup account

Return Value

Type: WsResult
Examples
By the method IWsBackup SetResetBackupAccountPassword you can reset password (generates new random password and changes the old one) for the backup account. Password is used to access the Web CentralControl web app.
/// WsBackupClient.SetResetBackupAccountPassword    Method (c# .NET)
public static string SetResetBackupAccountPassword(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 WsResult  
        // obtaining a SetResetBackupAccountPassword item
        WsResult result = client.SetResetBackupAccountPassword(backupAccountID);

        // 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