예제 #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>
 /// Unconfigures protection for given protection container
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionContainerMappingOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Required. Protection container name.
 /// </param>
 /// <param name='mappingName'>
 /// Required. Container mapping name.
 /// </param>
 /// <param name='input'>
 /// Required. Unconfigure protection input.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static LongRunningOperationResponse UnconfigureProtection(this IProtectionContainerMappingOperations operations, string fabricName, string protectionContainerName, string mappingName, RemoveProtectionContainerMappingInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProtectionContainerMappingOperations)s).UnconfigureProtectionAsync(fabricName, protectionContainerName, mappingName, input, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #3
0
 /// <summary>
 /// Get the list of all protection container mapping under a vault.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionContainerMappingOperations.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The definition of a Protection Container mapping collection object.
 /// </returns>
 public static ProtectionContainerMappingListResponse ListAll(this IProtectionContainerMappingOperations operations, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProtectionContainerMappingOperations)s).ListAllAsync(customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #4
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.IProtectionContainerMappingOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation.
 /// </param>
 /// <returns>
 /// Service response for operation which change status of mapping for
 /// protection container.
 /// </returns>
 public static MappingOperationResponse GetUnconfigureProtectionStatus(this IProtectionContainerMappingOperations operations, string operationStatusLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProtectionContainerMappingOperations)s).GetUnconfigureProtectionStatusAsync(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);
 }
예제 #6
0
 /// <summary>
 /// Configures protection for given protection container
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionContainerMappingOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Required. Protection container name.
 /// </param>
 /// <param name='mappingName'>
 /// Required. Container 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> BeginConfigureProtectionAsync(this IProtectionContainerMappingOperations operations, string fabricName, string protectionContainerName, string mappingName, CreateProtectionContainerMappingInput input, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.BeginConfigureProtectionAsync(fabricName, protectionContainerName, mappingName, input, customRequestHeaders, CancellationToken.None));
 }
예제 #7
0
 /// <summary>
 /// Get the list of all protection container mapping under a vault.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionContainerMappingOperations.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The definition of a Protection Container mapping collection object.
 /// </returns>
 public static Task <ProtectionContainerMappingListResponse> ListAllAsync(this IProtectionContainerMappingOperations operations, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.ListAllAsync(customRequestHeaders, CancellationToken.None));
 }
예제 #8
0
 /// <summary>
 /// Get the list of all protection container mapping for the given
 /// container under a fabric.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.SiteRecovery.IProtectionContainerMappingOperations.
 /// </param>
 /// <param name='fabricName'>
 /// Required. Fabric Unique name.
 /// </param>
 /// <param name='protectionContainerName'>
 /// Required. Protection Container Name.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// The definition of a Protection Container mapping collection object.
 /// </returns>
 public static Task <ProtectionContainerMappingListResponse> ListAsync(this IProtectionContainerMappingOperations operations, string fabricName, string protectionContainerName, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.ListAsync(fabricName, protectionContainerName, customRequestHeaders, CancellationToken.None));
 }
예제 #9
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.IProtectionContainerMappingOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation.
 /// </param>
 /// <returns>
 /// Service response for operation which change status of mapping for
 /// protection container.
 /// </returns>
 public static Task <MappingOperationResponse> GetUnconfigureProtectionStatusAsync(this IProtectionContainerMappingOperations operations, string operationStatusLink)
 {
     return(operations.GetUnconfigureProtectionStatusAsync(operationStatusLink, CancellationToken.None));
 }