IInfrascaleSdkRemoveOnlineBackupSettings Method |
Namespace: SOS.SDK.Contracts
RemoveOnlineBackupSettingsResponse RemoveOnlineBackupSettings( RemoveOnlineBackupSettingsRequest request )
Exception | Condition |
---|---|
NotSignedIn | |
MethodCallFailed |
using System; using System.Diagnostics; using System.Security.Principal; using SOS.SDK.Contracts.DataContracts; using SOS.SDK.Contracts.DataContracts.Jobs; using SOS.SDK.Contracts.DataContracts.Jobs.Backup; using SOS.SDK.Contracts.DataContracts.Requests; using SOS.SDK.Tools.Creators; using SOS.SDK.Tools.Runners; namespace SOS.SDK.Test.Examples.OnlineBackup { public class RunOnlineBackupExamples { private string _testAccount = @"sdk.test@sosonlinebackup.com"; private string _testAccountPassword = @"qweqwe"; private InfrascaleClient _client; private IdentityContract _identity; public void SignIn() { if (_client == null) { _client = new InfrascaleClient(); _client.Connect(); _identity = null; } if (_identity == null) { var signInResponse = _client.SignIn(new SignInRequest { Credentials = new CredentialsContract { Login = _testAccount, Password = _testAccountPassword } }); _identity = signInResponse.Identity; _client.SubscribeCallback(new SubscribeCallbackRequest {Identity = _identity}); } } public void RemoveOnlineBackupSettings() { SignIn(); // Remove stored Online Backup settings for authenticated user. _client.RemoveOnlineBackupSettings(new RemoveOnlineBackupSettingsRequest { Identity = _identity }); SignOut(); } } }