/// <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> /// Update vCenter. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IVCenterOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='vCenterName'> /// Required. vCenter Name. /// </param> /// <param name='input'> /// Required. Input to update vCenter. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse Update(this IVCenterOperations operations, string fabricName, string vCenterName, UpdateVCenterInput input, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IVCenterOperations)s).UpdateAsync(fabricName, vCenterName, input, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get the list of all vCenters under the vault. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IVCenterOperations. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list vCenters operation. /// </returns> public static VCenterListResponse ListAll(this IVCenterOperations operations, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IVCenterOperations)s).ListAllAsync(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.IVCenterOperations. /// </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 UpdateVCenterOperationResponse GetUpdateStatus(this IVCenterOperations operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((IVCenterOperations)s).GetUpdateStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the SiteRecoveryManagementClient /// class. /// </summary> public SiteRecoveryManagementClient() : base() { 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._recoveryServicesProvider = new RecoveryServicesProviderOperations(this); this._replicationProtectedItem = new ReplicationProtectedItemOperations(this); this._vCenters = new VCenterOperations(this); this._apiVersion = "2015-01-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Creates a vCenter /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IVCenterOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='vCenterName'> /// Required. vCenter Name. /// </param> /// <param name='input'> /// Required. Input to create vCenter. /// </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 IVCenterOperations operations, string fabricName, string vCenterName, CreateVCenterInput input, CustomRequestHeaders customRequestHeaders) { return(operations.BeginCreatingAsync(fabricName, vCenterName, input, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the list of all vCenters under the vault. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IVCenterOperations. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list vCenters operation. /// </returns> public static Task <VCenterListResponse> ListAllAsync(this IVCenterOperations operations, CustomRequestHeaders customRequestHeaders) { return(operations.ListAllAsync(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.IVCenterOperations. /// </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 <UpdateVCenterOperationResponse> GetUpdateStatusAsync(this IVCenterOperations operations, string operationStatusLink) { return(operations.GetUpdateStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// Get the vCenter object by Id. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IVCenterOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='vCenterName'> /// Required. vCenter Name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the vCenter object /// </returns> public static Task <VCenterResponse> GetAsync(this IVCenterOperations operations, string fabricName, string vCenterName, CustomRequestHeaders customRequestHeaders) { return(operations.GetAsync(fabricName, vCenterName, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Deletes a vCenter /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IVCenterOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='vCenterName'> /// Required. vCenter Name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> DeleteAsync(this IVCenterOperations operations, string fabricName, string vCenterName, CustomRequestHeaders customRequestHeaders) { return(operations.DeleteAsync(fabricName, vCenterName, customRequestHeaders, CancellationToken.None)); }