/// <summary> /// Unplanned failover of a protection entity. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='protectionContainerId'> /// Required. Parent Protection Container ID. /// </param> /// <param name='protectionEntityId'> /// Required. Protection entity ID. /// </param> /// <param name='parameters'> /// Required. Planned failover request. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static JobResponse UnplannedFailover(this IProtectionEntityOperations operations, string protectionContainerId, string protectionEntityId, UnplannedFailoverRequest parameters, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IProtectionEntityOperations)s).UnplannedFailoverAsync(protectionContainerId, protectionEntityId, parameters, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Creates a profile /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='pcName'> /// Required. Parent Protection Container name. /// </param> /// <param name='name'> /// Required. Protection entity name. /// </param> /// <param name='parameters'> /// Required. Test failover request. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse TestFailover(this IProtectionEntityOperations operations, string pcName, string name, TestFailoverRequest parameters, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IProtectionEntityOperations)s).TestFailoverAsync(pcName, name, parameters, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get the list of all protection entities. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='protectionContainerId'> /// Required. Parent Protection Container ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list Vm operation. /// </returns> public static ProtectionEntityListResponse List(this IProtectionEntityOperations operations, string protectionContainerId, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IProtectionEntityOperations)s).ListAsync(protectionContainerId, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static UnplannedFailoverOperationResponse GetUnplannedFailoverStatus(this IProtectionEntityOperations operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((IProtectionEntityOperations)s).GetUnplannedFailoverStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Enable Protection for the given protection entity. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='protectionContainerId'> /// Required. Parent Protection Container ID. /// </param> /// <param name='protectionEntityId'> /// Required. Protection entity ID. /// </param> /// <param name='input'> /// Optional. Protection entity ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse EnableProtection(this IProtectionEntityOperations operations, string protectionContainerId, string protectionEntityId, EnableProtectionInput input, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IProtectionEntityOperations)s).EnableProtectionAsync(protectionContainerId, protectionEntityId, input, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the SiteRecoveryManagementClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public SiteRecoveryManagementClient(HttpClient httpClient) : base(httpClient) { this._jobs = new JobOperations(this); this._protectionContainer = new ProtectionContainerOperations(this); this._protectionEntity = new ProtectionEntityOperations(this); this._protectionProfile = new ProtectionProfileOperations(this); this._recoveryPlan = new RecoveryPlanOperations(this); this._servers = new ServerOperations(this); this._apiVersion = "2015-01-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the SiteRecoveryManagementClient /// class. /// </summary> public SiteRecoveryManagementClient() : base() { this._jobs = new JobOperations(this); this._protectionContainer = new ProtectionContainerOperations(this); this._protectionEntity = new ProtectionEntityOperations(this); this._recoveryPlan = new RecoveryPlanOperations(this); this._servers = new ServerOperations(this); this._vmGroup = new VirtualMachineGroupOperations(this); this._vm = new VirtualMachineOperations(this); this._apiVersion = "2013-03-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the SiteRecoveryManagementClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public SiteRecoveryManagementClient(HttpClient httpClient) : base(httpClient) { this._jobs = new JobOperations(this); this._networkMappings = new NetworkMappingOperations(this); this._networks = new NetworkOperations(this); this._protectionContainer = new ProtectionContainerOperations(this); this._protectionEntity = new ProtectionEntityOperations(this); this._protectionProfile = new ProtectionProfileOperations(this); this._recoveryPlan = new RecoveryPlanOperations(this); this._servers = new ServerOperations(this); this._sites = new SiteOperations(this); this._storageMappings = new StorageMappingOperations(this); this._storages = new StorageOperations(this); this._vaultExtendedInfo = new VaultExtendedInfoOperations(this); this._vmGroup = new VirtualMachineGroupOperations(this); this._vm = new VirtualMachineOperations(this); this._apiVersion = "2013-03-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Commit failover of a protection entity. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='protectionContainerId'> /// Required. Parent Protection Container ID. /// </param> /// <param name='protectionEntityId'> /// Required. Protection entity ID. /// </param> /// <param name='parameters'> /// Required. Commit failover request. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static Task <JobResponse> CommitFailoverAsync(this IProtectionEntityOperations operations, string protectionContainerId, string protectionEntityId, CommitFailoverRequest parameters, CustomRequestHeaders customRequestHeaders) { return(operations.CommitFailoverAsync(protectionContainerId, protectionEntityId, parameters, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Synchronise Owner Information for the given protection entity. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='protectionContainerId'> /// Required. Parent Protection Container ID. /// </param> /// <param name='protectionEntityId'> /// Required. Protection entity ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static Task <JobResponse> SyncOwnerInformationAsync(this IProtectionEntityOperations operations, string protectionContainerId, string protectionEntityId, CustomRequestHeaders customRequestHeaders) { return(operations.SyncOwnerInformationAsync(protectionContainerId, protectionEntityId, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the list of all protection entities. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='protectionContainerId'> /// Required. Parent Protection Container ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list Vm operation. /// </returns> public static Task <ProtectionEntityListResponse> ListAsync(this IProtectionEntityOperations operations, string protectionContainerId, CustomRequestHeaders customRequestHeaders) { return(operations.ListAsync(protectionContainerId, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Enable Protection for the given protection entity. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='protectionContainerId'> /// Required. Parent Protection Container ID. /// </param> /// <param name='protectionEntityId'> /// Required. Protection entity ID. /// </param> /// <param name='input'> /// Optional. Protection entity ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static Task <JobResponse> EnableProtectionAsync(this IProtectionEntityOperations operations, string protectionContainerId, string protectionEntityId, EnableProtectionInput input, CustomRequestHeaders customRequestHeaders) { return(operations.EnableProtectionAsync(protectionContainerId, protectionEntityId, input, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Creates a profile /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='pcName'> /// Required. Parent Protection Container name. /// </param> /// <param name='name'> /// Required. Protection entity name. /// </param> /// <param name='parameters'> /// Required. Test failover request. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> TestFailoverAsync(this IProtectionEntityOperations operations, string pcName, string name, TestFailoverRequest parameters, CustomRequestHeaders customRequestHeaders) { return(operations.TestFailoverAsync(pcName, name, parameters, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <UnplannedFailoverOperationResponse> GetUnplannedFailoverStatusAsync(this IProtectionEntityOperations operations, string operationStatusLink) { return(operations.GetUnplannedFailoverStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IProtectionEntityOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <ReprotectOperationResponse> GetReprotectStatusAsync(this IProtectionEntityOperations operations, string operationStatusLink) { return(operations.GetReprotectStatusAsync(operationStatusLink, CancellationToken.None)); }