예제 #1
0
 /// <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);
 }
예제 #2
0
 /// <summary>
 /// Pairs storage to a given storage.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IStorageClassificationMappingOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric name.
 /// </param>
 /// <param name='storageClassificationName'>
 /// Required. Storage name.
 /// </param>
 /// <param name='storageClassificationMappingName'>
 /// Required. Storage mapping name.
 /// </param>
 /// <param name='input'>
 /// Required. Create mapping input.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static LongRunningOperationResponse BeginPairStorageClassification(this IStorageClassificationMappingOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IStorageClassificationMappingOperations)s).BeginPairStorageClassificationAsync(fabricName, storageClassificationName, storageClassificationMappingName, input, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #3
0
 /// <summary>
 /// Gets the replication storage mapping objects under a vault.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IStorageClassificationMappingOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The url to the next protected items page.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the list storage mapping operation.
 /// </returns>
 public static StorageClassificationMappingListResponse ListNext(this IStorageClassificationMappingOperations operations, string nextLink, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IStorageClassificationMappingOperations)s).ListNextAsync(nextLink, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #4
0
 /// <summary>
 /// Pairs storage to a given storage.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IStorageClassificationMappingOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric name.
 /// </param>
 /// <param name='storageClassificationName'>
 /// Required. Storage name.
 /// </param>
 /// <param name='storageClassificationMappingName'>
 /// Required. Storage mapping name.
 /// </param>
 /// <param name='input'>
 /// Required. Create 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> BeginPairStorageClassificationAsync(this IStorageClassificationMappingOperations operations, string fabricName, string storageClassificationName, string storageClassificationMappingName, StorageClassificationMappingInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.BeginPairStorageClassificationAsync(fabricName, storageClassificationName, storageClassificationMappingName, input, customRequestHeaders, CancellationToken.None));
 }
예제 #5
0
 /// <summary>
 /// Gets the replication storage mapping objects under a vault.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IStorageClassificationMappingOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The url to the next protected items page.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the list storage mapping operation.
 /// </returns>
 public static Task <StorageClassificationMappingListResponse> ListNextAsync(this IStorageClassificationMappingOperations operations, string nextLink, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.ListNextAsync(nextLink, customRequestHeaders, CancellationToken.None));
 }
예제 #6
0
 /// <summary>
 /// Gets the replication storage mapping objects under a storage.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IStorageClassificationMappingOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric unique name.
 /// </param>
 /// <param name='storageClassificationName'>
 /// Required. Storage unique name.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The response model for the list storage mapping operation.
 /// </returns>
 public static Task <StorageClassificationMappingListResponse> ListAsync(this IStorageClassificationMappingOperations operations, string fabricName, string storageClassificationName, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.ListAsync(fabricName, storageClassificationName, customRequestHeaders, CancellationToken.None));
 }
예제 #7
0
 /// <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.IStorageClassificationMappingOperations.
 /// </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 <LongRunningOperationResponse> GetUnpairStorageClassificationStatusAsync(this IStorageClassificationMappingOperations operations, string operationStatusLink)
 {
     return(operations.GetUnpairStorageClassificationStatusAsync(operationStatusLink, CancellationToken.None));
 }
예제 #8
0
 /// <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.IStorageClassificationMappingOperations.
 /// </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 LongRunningOperationResponse GetUnpairStorageClassificationStatus(this IStorageClassificationMappingOperations operations, string operationStatusLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IStorageClassificationMappingOperations)s).GetUnpairStorageClassificationStatusAsync(operationStatusLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }