/// <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> /// Creates Network Mapping. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.INetworkMappingOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='primaryNetworkName'> /// Required. Primary Network Name. /// </param> /// <param name='networkMappingName'> /// Required. Network Mapping Name. /// </param> /// <param name='input'> /// Required. Network Mapping input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse BeginCreating(this INetworkMappingOperations operations, string fabricName, string primaryNetworkName, string networkMappingName, CreateNetworkMappingInput input, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((INetworkMappingOperations)s).BeginCreatingAsync(fabricName, primaryNetworkName, networkMappingName, input, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Get list of Network Mappings. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.INetworkMappingOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric unique name. /// </param> /// <param name='primaryNetworkName'> /// Required. Network name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list of Network Mappings. /// </returns> public static NetworkMappingsListResponse List(this INetworkMappingOperations operations, string fabricName, string primaryNetworkName, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((INetworkMappingOperations)s).ListAsync(fabricName, primaryNetworkName, 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.INetworkMappingOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Delete operation. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse GetDeleteStatus(this INetworkMappingOperations operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((INetworkMappingOperations)s).GetDeleteStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Delete network mapping. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.INetworkMappingOperations. /// </param> /// <param name='parameters'> /// Required. Delete network mapping input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static JobResponse Delete(this INetworkMappingOperations operations, NetworkUnMappingInput parameters, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((INetworkMappingOperations)s).DeleteAsync(parameters, customRequestHeaders); } , 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> /// 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> /// Creates Network Mapping. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.INetworkMappingOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric Name. /// </param> /// <param name='primaryNetworkName'> /// Required. Primary Network Name. /// </param> /// <param name='networkMappingName'> /// Required. Network Mapping Name. /// </param> /// <param name='input'> /// Required. Network Mapping 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 INetworkMappingOperations operations, string fabricName, string primaryNetworkName, string networkMappingName, CreateNetworkMappingInput input, CustomRequestHeaders customRequestHeaders) { return(operations.BeginCreatingAsync(fabricName, primaryNetworkName, networkMappingName, input, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get list of Network Mappings. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.INetworkMappingOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric unique name. /// </param> /// <param name='primaryNetworkName'> /// Required. Network name. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list of Network Mappings. /// </returns> public static Task <NetworkMappingsListResponse> ListAsync(this INetworkMappingOperations operations, string fabricName, string primaryNetworkName, CustomRequestHeaders customRequestHeaders) { return(operations.ListAsync(fabricName, primaryNetworkName, 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.INetworkMappingOperations. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Delete operation. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task <LongRunningOperationResponse> GetDeleteStatusAsync(this INetworkMappingOperations operations, string operationStatusLink) { return(operations.GetDeleteStatusAsync(operationStatusLink, CancellationToken.None)); }
/// <summary> /// Get list of Network Mappings. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.INetworkMappingOperations. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list of Network Mappings. /// </returns> public static Task <NetworkMappingsListResponse> GetAllAsync(this INetworkMappingOperations operations, CustomRequestHeaders customRequestHeaders) { return(operations.GetAllAsync(customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Create network mapping. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.INetworkMappingOperations. /// </param> /// <param name='parameters'> /// Required. Create network mapping input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the Job details object. /// </returns> public static Task <JobResponse> CreateAsync(this INetworkMappingOperations operations, NetworkMappingInput parameters, CustomRequestHeaders customRequestHeaders) { return(operations.CreateAsync(parameters, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Get the list of all network mappings under the vault. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.SiteRecovery.INetworkMappingOperations. /// </param> /// <param name='primaryServerId'> /// Required. Primary server Id. /// </param> /// <param name='recoveryServerId'> /// Required. Recovery server Id. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// The response model for the list of network mappings operation. /// </returns> public static Task <NetworkMappingListResponse> ListAsync(this INetworkMappingOperations operations, string primaryServerId, string recoveryServerId, CustomRequestHeaders customRequestHeaders) { return(operations.ListAsync(primaryServerId, recoveryServerId, customRequestHeaders, CancellationToken.None)); }