/// <summary> /// Initializes a new instance of the SiteRecoveryManagementClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public SiteRecoveryManagementClient(HttpClient httpClient) : base(httpClient) { this._alertSettings = new AlertSettingsOperations(this); this._events = new EventOperations(this); this._fabrics = new FabricOperations(this); this._jobs = new JobOperations(this); this._logicalNetwork = new LogicalNetworkOperations(this); this._networkMapping = new NetworkMappingOperations(this); this._network = new NetworkOperations(this); this._policies = new PolicyOperations(this); this._protectableItem = new ProtectableItemOperations(this); this._protectionContainerMapping = new ProtectionContainerMappingOperations(this); this._protectionContainer = new ProtectionContainerOperations(this); this._recoveryPlan = new RecoveryPlanOperations(this); this._recoveryPoint = new RecoveryPointOperations(this); this._recoveryServicesProvider = new RecoveryServicesProviderOperations(this); this._replicationProtectedItem = new ReplicationProtectedItemOperations(this); this._storageClassificationMapping = new StorageClassificationMappingOperations(this); this._storageClassification = new StorageClassificationOperations(this); this._vCenters = new VCenterOperations(this); this._apiVersion = "2015-01-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Create the recovery plan. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='parameters'> /// Required. Create recovery plan input parameters. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static JobResponse CreateRecoveryPlan(this IRecoveryPlanOperations operations, RecoveryPlanXmlData parameters, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryPlanOperations)s).CreateRecoveryPlanAsync(parameters, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Commit the recovery plan. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='recoveryPlanId'> /// Required. RecoveryPlan ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static JobResponse Commit(this IRecoveryPlanOperations operations, string recoveryPlanId, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryPlanOperations)s).CommitAsync(recoveryPlanId, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Updates the given recovery plan. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='recoveryPlanName'> /// Required. Recovery plan name. /// </param> /// <param name='input'> /// Required. Update recovery plan input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse Update(this IRecoveryPlanOperations operations, string recoveryPlanName, UpdateRecoveryPlanInput input, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryPlanOperations)s).UpdateAsync(recoveryPlanName, input, 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.IRecoveryPlanOperations. /// </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 UpdateRecoveryPlanOperationResponse GetUpdateStatus(this IRecoveryPlanOperations operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((IRecoveryPlanOperations)s).GetUpdateStatusAsync(operationStatusLink); } , 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 the recovery plan. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='recoveryPlanId'> /// Required. RecoveryPlan ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static Task <JobResponse> CommitAsync(this IRecoveryPlanOperations operations, string recoveryPlanId, CustomRequestHeaders customRequestHeaders) { return(operations.CommitAsync(recoveryPlanId, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Update the recovery plan. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='parameters'> /// Required. Update recovery plan input parameters. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static Task <JobResponse> UpdateRecoveryPlanAsync(this IRecoveryPlanOperations operations, RecoveryPlanXmlData parameters, CustomRequestHeaders customRequestHeaders) { return(operations.UpdateRecoveryPlanAsync(parameters, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// UnplannedFailover for the recovery plan. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='recoveryPlanId'> /// Required. RecoveryPlan ID. /// </param> /// <param name='parameters'> /// Optional. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static Task <JobResponse> RecoveryPlanUnplannedFailoverAsync(this IRecoveryPlanOperations operations, string recoveryPlanId, RpUnplannedFailoverRequest parameters, CustomRequestHeaders customRequestHeaders) { return(operations.RecoveryPlanUnplannedFailoverAsync(recoveryPlanId, parameters, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the list of all recoveryplans under the resource. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list recoveryplans operation. /// </returns> public static Task <RecoveryPlanListResponse> ListAsync(this IRecoveryPlanOperations operations, CustomRequestHeaders customRequestHeaders) { return(operations.ListAsync(customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the recovery plan xml by the ID. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='recoveryPlanId'> /// Required. RecoveryPlan ID. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The xml output for the recoveryplan object. /// </returns> public static Task <RecoveryPlanXmlOuput> GetRecoveryPlanXmlAsync(this IRecoveryPlanOperations operations, string recoveryPlanId, CustomRequestHeaders customRequestHeaders) { return(operations.GetRecoveryPlanXmlAsync(recoveryPlanId, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Creates a recovery plan. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='recoveryPlanName'> /// Required. Recovery plan name. /// </param> /// <param name='input'> /// Required. Create recovery plan input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> BeginCreatingAsync(this IRecoveryPlanOperations operations, string recoveryPlanName, CreateRecoveryPlanInput input, CustomRequestHeaders customRequestHeaders) { return(operations.BeginCreatingAsync(recoveryPlanName, input, 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.IRecoveryPlanOperations. /// </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 <UpdateRecoveryPlanOperationResponse> GetUpdateStatusAsync(this IRecoveryPlanOperations operations, string operationStatusLink) { return(operations.GetUpdateStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// Gets the recovery plan by Id. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IRecoveryPlanOperations. /// </param> /// <param name='recoveryPlanName'> /// Required. Recovery plan name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the recovery plan object. /// </returns> public static Task <RecoveryPlanResponse> GetAsync(this IRecoveryPlanOperations operations, string recoveryPlanName, CustomRequestHeaders customRequestHeaders) { return(operations.GetAsync(recoveryPlanName, customRequestHeaders, CancellationToken.None)); }