/// <summary> /// The BeginCreatingBackupPolicy operation creates a new backup policy /// for this given volume with the given schedules. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='backupPolicy'> /// Required. Parameters supplied to the Create Backup Policy 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 BeginCreatingBackupPolicy(this IBackupPolicyOperations operations, string deviceId, NewBackupPolicyConfig backupPolicy, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IBackupPolicyOperations)s).BeginCreatingBackupPolicyAsync(deviceId, backupPolicy, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='policyId'> /// Required. The backup policy ID to update. /// </param> /// <param name='policyInfo'> /// Required. Parameters supplied to the Create Backup Policy operation. /// </param> /// <param name='customRequestHeaders'> /// Required. The Custom Request Headers which client must use. /// </param> /// <returns> /// Info about the async task /// </returns> public static TaskStatusInfo Update(this IBackupPolicyOperations operations, string deviceId, string policyId, UpdateBackupPolicyConfig policyInfo, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IBackupPolicyOperations)s).UpdateAsync(deviceId, policyId, policyInfo, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='policyName'> /// Required. The name of the policy to fetch backup policy details by. /// </param> /// <param name='customRequestHeaders'> /// Required. The Custom Request Headers which client must use. /// </param> /// <returns> /// The response model for the list of backup policies. /// </returns> public static GetBackupPolicyDetailsResponse GetBackupPolicyDetailsByName(this IBackupPolicyOperations operations, string deviceId, string policyName, CustomRequestHeaders customRequestHeaders) { return(Task.Factory.StartNew((object s) => { return ((IBackupPolicyOperations)s).GetBackupPolicyDetailsByNameAsync(deviceId, policyName, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <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); }
/// <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 BeginCreatingBackupPolicy operation creates a new backup policy /// for this given volume with the given schedules. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='backupPolicy'> /// Required. Parameters supplied to the Create Backup Policy 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> BeginCreatingBackupPolicyAsync(this IBackupPolicyOperations operations, string deviceId, NewBackupPolicyConfig backupPolicy, CustomRequestHeaders customRequestHeaders) { return(operations.BeginCreatingBackupPolicyAsync(deviceId, backupPolicy, customRequestHeaders, CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='policyId'> /// Required. The backup policy ID to update. /// </param> /// <param name='policyInfo'> /// Required. Parameters supplied to the Create Backup Policy 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> UpdateAsync(this IBackupPolicyOperations operations, string deviceId, string policyId, UpdateBackupPolicyConfig policyInfo, CustomRequestHeaders customRequestHeaders) { return(operations.UpdateAsync(deviceId, policyId, policyInfo, customRequestHeaders, CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='customRequestHeaders'> /// Required. The Custom Request Headers which client must use. /// </param> /// <returns> /// The response model for the list of backup policies. /// </returns> public static Task <BackupPolicyListResponse> ListAsync(this IBackupPolicyOperations operations, string deviceId, CustomRequestHeaders customRequestHeaders) { return(operations.ListAsync(deviceId, customRequestHeaders, CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='policyName'> /// Required. The name of the policy to fetch backup policy details by. /// </param> /// <param name='customRequestHeaders'> /// Required. The Custom Request Headers which client must use. /// </param> /// <returns> /// The response model for the list of backup policies. /// </returns> public static Task <GetBackupPolicyDetailsResponse> GetBackupPolicyDetailsByNameAsync(this IBackupPolicyOperations operations, string deviceId, string policyName, CustomRequestHeaders customRequestHeaders) { return(operations.GetBackupPolicyDetailsByNameAsync(deviceId, policyName, customRequestHeaders, CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='backupPolicy'> /// Required. Parameters supplied to the Create Backup Policy 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 IBackupPolicyOperations operations, string deviceId, NewBackupPolicyConfig backupPolicy, CustomRequestHeaders customRequestHeaders) { return(operations.CreateAsync(deviceId, backupPolicy, customRequestHeaders, CancellationToken.None)); }
/// <summary> /// Begin deleting a backup policy represented by the policyId provided. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.StorSimple.IBackupPolicyOperations. /// </param> /// <param name='deviceId'> /// Required. The device id for which the call will be made. /// </param> /// <param name='policyId'> /// Required. The backup policy 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 IBackupPolicyOperations operations, string deviceId, string policyId, CustomRequestHeaders customRequestHeaders) { return(operations.BeginDeletingAsync(deviceId, policyId, customRequestHeaders, CancellationToken.None)); }