Click or drag to resize

IInfrascaleSdkPauseOnlineBackup Method

Pause the current backup session.

Namespace:  SOS.SDK.Contracts
Assembly:  SOS.SDK (in SOS.SDK.dll) Version: 7.6.1.5742
Syntax
C#
PauseOnlineBackupResponse PauseOnlineBackup(
	PauseOnlineBackupRequest request
)

Parameters

request
Type: SOS.SDK.Contracts.DataContracts.RequestsPauseOnlineBackupRequest
Parameters of the pausing.

Return Value

Type: PauseOnlineBackupResponse
Pausing results.
Exceptions
ExceptionCondition
NotSignedIn
MethodCallFailed
Remarks
Pausing the current backup session, regardless of who launched it. If there are other requests for backup in the queue, they will be paused too. In the absence of active sessions, the Pause does nothing.
Examples
Example 1
using SOS.SDK.Contracts.DataContracts;
using SOS.SDK.Contracts.DataContracts.Requests;

namespace SOS.SDK.Test.Examples.OnlineBackup
{
    public class OnlineBackupStateExamples
    {
        private string _testAccount = @"sdk.test@sosonlinebackup.com";
        private string _testAccountPassword = @"qweqwe";
        private IInfrascaleClient _client;

        public IdentityContract SignIn()
        {
            _client = new InfrascaleClient();
            _client.Connect();

            var signInResponse = _client.SignIn(new SignInRequest
            {
                Credentials = new CredentialsContract {Login = _testAccount, Password = _testAccountPassword}
            });

            return signInResponse.Identity;
        }

        public void PauseOnlineBackup()
        {
            var identity = SignIn();
            _client.PauseOnlineBackup(new PauseOnlineBackupRequest {Identity = identity});
        }
    }
}
See Also