Click or drag to resize

IWsBackupSetChangeBackupAccountPassword Method

Changes password for the backup account. Password must conform to the password strength policy.

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 SetChangeBackupAccountPassword(
	int backupAccountID,
	string oldPpassword,
	string newPassword
)

Parameters

backupAccountID
Type: SystemInt32
ID of backup account
oldPpassword
Type: SystemString
old password (used for verification)
newPassword
Type: SystemString
new password

Return Value

Type: WsResult
Examples
By the method IWsBackup SetChangeBackupAccountPassword you can changes password for the backup account. Password is used to access the Web CentralControl web app
/// WsBackupClient.SetChangeBackupAccountPassword    Method (c# .NET)
public static string SetChangeBackupAccountPassword(WsBackupClient client,
        int backupAccountID, string oldPpassword, string newPassword)
{
    //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.SetChangeBackupAccountPassword(backupAccountID, 
            oldPpassword, newPassword);

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