Click or drag to resize

IWsBackupSetBackupAccountAutoRenewal Method

Indicates whether set the auto renewal or not.

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 SetBackupAccountAutoRenewal(
	int backupAccountID,
	bool autoRenewal
)

Parameters

backupAccountID
Type: SystemInt32
Id of the backupAccount
autoRenewal
Type: SystemBoolean
True to enable auto renewal. False to disable auto renewal.

Return Value

Type: WsResult
The method set then AutoRenewal flag of a specific backup account according the autoRenewal parameter. The Value property for instance returns a <WsResult>.
Examples
The following example describes a method, called SetAutoRenewal(), which means a call to SetBackupAccountAutoRenewal() to Aruba WsBackup, set autorenewal status to a backup account.
// Set autorenewal status to an existing backup account id
private void SetAutoRenewal()
{
    int backupAccountID = 123;
    bool autoRenewal = true;
    StringBuilder sb = new StringBuilder();
    using (var client = this.WsBackupClient)
    {
        var result = client.SetBackupAccountAutoRenewal(backupAccountID, autoRenewal);
        if (!result.Success)
        {
            throw new ApplicationException(String.Format("An error has occurred while invoking SetBackupAccountAutoRenewal(). This is the inner exception: {0}", result.ResultMessage));
        }
    }
    return sb.ToString();
}
See Also