Exemplo n.º 1
0
 /// <summary>
 /// Begin a backup operation for the policyId and backupRequest
 /// specified.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='policyId'>
 /// Required. The policy id for which the call will be made.
 /// </param>
 /// <param name='backupRequest'>
 /// Required. Parameters supplied to the Begin Backup operation.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// This is the Task Response for all Async Calls
 /// </returns>
 public static TaskResponse BeginCreatingBackup(this IBackupOperations operations, string deviceId, string policyId, BackupNowRequest backupRequest, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IBackupOperations)s).BeginCreatingBackupAsync(deviceId, policyId, backupRequest, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The Trigger Backup Operation starts an operation in the service
 /// which triggers the backup of the specified item in the specified
 /// container in your Recovery Services Vault. This is an asynchronous
 /// operation. To determine whether the backend service has finished
 /// processing the request, call Get Protected Item Operation Result
 /// API.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.RecoveryServices.Backup.IBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Resource group name of your recovery services vault.
 /// </param>
 /// <param name='resourceName'>
 /// Required. Name of your recovery services vault.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. Request header parameters.
 /// </param>
 /// <param name='fabricName'>
 /// Optional. Fabric name of the protected item.
 /// </param>
 /// <param name='containerName'>
 /// Optional. Name of the container where the protected item belongs to.
 /// </param>
 /// <param name='protectedItemName'>
 /// Optional. Name of the protected item which has to be backed up.
 /// </param>
 /// <param name='request'>
 /// Optional. Backup request for the backup item.
 /// </param>
 /// <returns>
 /// Base recovery job response for all the asynchronous operations.
 /// </returns>
 public static BaseRecoveryServicesJobResponse TriggerBackup(this IBackupOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string fabricName, string containerName, string protectedItemName, TriggerBackupRequest request)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IBackupOperations)s).TriggerBackupAsync(resourceGroupName, resourceName, customRequestHeaders, fabricName, containerName, protectedItemName, request);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 3
0
 /// <summary>
 /// Restore a backup set.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='backupDetailsForRestore'>
 /// Required. The details of the backup to be restored.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static TaskStatusInfo Restore(this IBackupOperations operations, string deviceId, RestoreBackupRequest backupDetailsForRestore, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IBackupOperations)s).RestoreAsync(deviceId, backupDetailsForRestore, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 4
0
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='filterType'>
 /// Optional. If isAllSelected = true, then specify Volume or
 /// BackupPolicy here
 /// </param>
 /// <param name='isAllSelected'>
 /// Required. To retrieve Volume or BackupPolicy or both
 /// </param>
 /// <param name='filterValue'>
 /// Optional. If isAllSelected = true then specify VolumeId or
 /// BackupPolicy here
 /// </param>
 /// <param name='startTime'>
 /// Optional. StartTime for filtering BackupSets
 /// </param>
 /// <param name='endTime'>
 /// Optional. EndTime for filtering BackupSets
 /// </param>
 /// <param name='skip'>
 /// Optional. Number of elements to be skipped as part of pagination
 /// </param>
 /// <param name='top'>
 /// Optional. Number of elements to retrieve in the current page
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// The response model for the list of BackupSets.
 /// </returns>
 public static GetBackupResponse Get(this IBackupOperations operations, string deviceId, string filterType, string isAllSelected, string filterValue, string startTime, string endTime, string skip, string top, CustomRequestHeaders customRequestHeaders)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IBackupOperations)s).GetAsync(deviceId, filterType, isAllSelected, filterValue, startTime, endTime, skip, top, customRequestHeaders);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the StorSimpleManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public StorSimpleManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._backup                             = new BackupOperations(this);
     this._backupPolicy                       = new BackupPolicyOperations(this);
     this._dataContainer                      = new DataContainerOperations(this);
     this._deviceDetails                      = new DeviceDetailsOperations(this);
     this._devices                            = new DeviceOperations(this);
     this._iscsiConnection                    = new IscsiConnectionDetailsOperations(this);
     this._resourceEncryptionKeys             = new ResourceEncryptionKeyOperations(this);
     this._serviceConfig                      = new ServiceConfigurationOperations(this);
     this._virtualDisk                        = new VirtualDiskOperations(this);
     this._apiVersion                         = "2014-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the StorSimpleManagementClient class.
 /// </summary>
 public StorSimpleManagementClient()
     : base()
 {
     this._backup                             = new BackupOperations(this);
     this._backupPolicy                       = new BackupPolicyOperations(this);
     this._cloneVolume                        = new CloneVolumeOperations(this);
     this._dataContainer                      = new DataContainerOperations(this);
     this._deviceDetails                      = new DeviceDetailsOperations(this);
     this._deviceFailover                     = new DeviceFailoverOperations(this);
     this._deviceJob                          = new DeviceJobOperations(this);
     this._devices                            = new DeviceOperations(this);
     this._devicePublicKey                    = new DevicePublicKeyOperations(this);
     this._iscsiConnection                    = new IscsiConnectionDetailsOperations(this);
     this._migrateLegacyAppliance             = new MigrationOperations(this);
     this._resourceEncryptionKeys             = new ResourceEncryptionKeyOperations(this);
     this._serviceConfig                      = new ServiceConfigurationOperations(this);
     this._virtualDevice                      = new VirtualDeviceOperations(this);
     this._virtualDisk                        = new VirtualDiskOperations(this);
     this._apiVersion                         = "2014-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// The Trigger Backup Operation starts an operation in the service
 /// which triggers the backup of the specified item in the specified
 /// container in your Recovery Services Vault. This is an asynchronous
 /// operation. To determine whether the backend service has finished
 /// processing the request, call Get Protected Item Operation Result
 /// API.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.RecoveryServices.Backup.IBackupOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. Resource group name of your recovery services vault.
 /// </param>
 /// <param name='resourceName'>
 /// Required. Name of your recovery services vault.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. Request header parameters.
 /// </param>
 /// <param name='fabricName'>
 /// Optional. Fabric name of the protected item.
 /// </param>
 /// <param name='containerName'>
 /// Optional. Name of the container where the protected item belongs to.
 /// </param>
 /// <param name='protectedItemName'>
 /// Optional. Name of the protected item which has to be backed up.
 /// </param>
 /// <param name='request'>
 /// Optional. Backup request for the backup item.
 /// </param>
 /// <returns>
 /// Base recovery job response for all the asynchronous operations.
 /// </returns>
 public static Task <BaseRecoveryServicesJobResponse> TriggerBackupAsync(this IBackupOperations operations, string resourceGroupName, string resourceName, CustomRequestHeaders customRequestHeaders, string fabricName, string containerName, string protectedItemName, TriggerBackupRequest request)
 {
     return(operations.TriggerBackupAsync(resourceGroupName, resourceName, customRequestHeaders, fabricName, containerName, protectedItemName, request, CancellationToken.None));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Begin a backup operation for the policyId and backupRequest
 /// specified.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='policyId'>
 /// Required. The policy id for which the call will be made.
 /// </param>
 /// <param name='backupRequest'>
 /// Required. Parameters supplied to the Begin Backup operation.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// This is the Task Response for all Async Calls
 /// </returns>
 public static Task <TaskResponse> BeginCreatingBackupAsync(this IBackupOperations operations, string deviceId, string policyId, BackupNowRequest backupRequest, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.BeginCreatingBackupAsync(deviceId, policyId, backupRequest, customRequestHeaders, CancellationToken.None));
 }
Exemplo n.º 9
0
 /// <summary>
 /// Restore a backup set.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='backupDetailsForRestore'>
 /// Required. The details of the backup to be restored.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static Task <TaskStatusInfo> RestoreAsync(this IBackupOperations operations, string deviceId, RestoreBackupRequest backupDetailsForRestore, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.RestoreAsync(deviceId, backupDetailsForRestore, customRequestHeaders, CancellationToken.None));
 }
Exemplo n.º 10
0
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='filterType'>
 /// Optional. If isAllSelected = true, then specify Volume or
 /// BackupPolicy here
 /// </param>
 /// <param name='isAllSelected'>
 /// Required. To retrieve Volume or BackupPolicy or both
 /// </param>
 /// <param name='filterValue'>
 /// Optional. If isAllSelected = true then specify VolumeId or
 /// BackupPolicy here
 /// </param>
 /// <param name='startTime'>
 /// Optional. StartTime for filtering BackupSets
 /// </param>
 /// <param name='endTime'>
 /// Optional. EndTime for filtering BackupSets
 /// </param>
 /// <param name='skip'>
 /// Optional. Number of elements to be skipped as part of pagination
 /// </param>
 /// <param name='top'>
 /// Optional. Number of elements to retrieve in the current page
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// The response model for the list of BackupSets.
 /// </returns>
 public static Task <GetBackupResponse> GetAsync(this IBackupOperations operations, string deviceId, string filterType, string isAllSelected, string filterValue, string startTime, string endTime, string skip, string top, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.GetAsync(deviceId, filterType, isAllSelected, filterValue, startTime, endTime, skip, top, customRequestHeaders, CancellationToken.None));
 }
Exemplo n.º 11
0
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='backupSetId'>
 /// Required. The backup set ID to delete.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static Task <TaskStatusInfo> DeleteAsync(this IBackupOperations operations, string deviceId, string backupSetId, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.DeleteAsync(deviceId, backupSetId, customRequestHeaders, CancellationToken.None));
 }
Exemplo n.º 12
0
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='policyId'>
 /// Required. The policy id for which the call will be made.
 /// </param>
 /// <param name='backupRequest'>
 /// Required. Parameters supplied to the Begin Backup operation.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static Task <TaskStatusInfo> CreateAsync(this IBackupOperations operations, string deviceId, string policyId, BackupNowRequest backupRequest, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.CreateAsync(deviceId, policyId, backupRequest, customRequestHeaders, CancellationToken.None));
 }
Exemplo n.º 13
0
 /// <summary>
 /// Begin deleting a backup set represented by the backSetId provided.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IBackupOperations.
 /// </param>
 /// <param name='deviceId'>
 /// Required. The device id for which the call will be made.
 /// </param>
 /// <param name='backupSetId'>
 /// Required. The backup set ID to delete.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// This is the Task Response for all Async Calls
 /// </returns>
 public static Task <TaskResponse> BeginDeletingAsync(this IBackupOperations operations, string deviceId, string backupSetId, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.BeginDeletingAsync(deviceId, backupSetId, customRequestHeaders, CancellationToken.None));
 }