/// <summary> /// Copy user disk from one collection to the other and keep the source /// user disk. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.RemoteApp.IUserDiskOperations. /// </param> /// <param name='srcCollectionName'> /// Required. The source collection name. /// </param> /// <param name='dstCollectionName'> /// Required. The destination collection name. /// </param> /// <param name='userUpn'> /// Required. The user upn. /// </param> /// <param name='overwriteExistingUserDisk'> /// Required. A flag denoting if the request is to overwrite the /// existing user disk /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Copy(this IUserDiskOperations operations, string srcCollectionName, string dstCollectionName, string userUpn, bool overwriteExistingUserDisk) { return(Task.Factory.StartNew((object s) => { return ((IUserDiskOperations)s).CopyAsync(srcCollectionName, dstCollectionName, userUpn, overwriteExistingUserDisk); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Deletes the given user disk. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.RemoteApp.IUserDiskOperations. /// </param> /// <param name='collectionName'> /// Required. The RemoteApp collection name. /// </param> /// <param name='userUpn'> /// Required. The user upn. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Delete(this IUserDiskOperations operations, string collectionName, string userUpn) { return(Task.Factory.StartNew((object s) => { return ((IUserDiskOperations)s).DeleteAsync(collectionName, userUpn); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Migrate user disks of all the users from a collection to the /// specified azure storage account /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.RemoteApp.IUserDiskOperations. /// </param> /// <param name='collectionName'> /// Required. The collection name. /// </param> /// <param name='targetAccountName'> /// Required. The destination storage account name /// </param> /// <param name='targetAccountKey'> /// Required. The destination storage account key /// </param> /// <param name='targetContainerName'> /// Required. The destination container name /// </param> /// <param name='overwriteExistingUserDisk'> /// Required. A flag denoting if the request is to overwrite the /// existing user disk in the destination storage account /// </param> /// <returns> /// The response containing the operation tracking id. /// </returns> public static OperationResultWithTrackingId Migrate(this IUserDiskOperations operations, string collectionName, string targetAccountName, string targetAccountKey, string targetContainerName, bool overwriteExistingUserDisk) { return(Task.Factory.StartNew((object s) => { return ((IUserDiskOperations)s).MigrateAsync(collectionName, targetAccountName, targetAccountKey, targetContainerName, overwriteExistingUserDisk); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the RemoteAppManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public RemoteAppManagementClient(HttpClient httpClient) : base(httpClient) { this._account = new AccountsOperations(this); this._collections = new CollectionOperations(this); this._operationResults = new OperationResultOperations(this); this._principals = new PrincipalOperations(this); this._publishing = new PublishingOperations(this); this._templateImages = new TemplateImageOperations(this); this._userDisks = new UserDiskOperations(this); this._vNet = new VNetOperations(this); this._rdfeNamespace = "remoteapp"; this._apiVersion = "2014-09-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Copy user disk from one collection to the other and keep the source /// user disk. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.RemoteApp.IUserDiskOperations. /// </param> /// <param name='srcCollectionName'> /// Required. The source collection name. /// </param> /// <param name='dstCollectionName'> /// Required. The destination collection name. /// </param> /// <param name='userUpn'> /// Required. The user upn. /// </param> /// <param name='overwriteExistingUserDisk'> /// Required. A flag denoting if the request is to overwrite the /// existing user disk /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> CopyAsync(this IUserDiskOperations operations, string srcCollectionName, string dstCollectionName, string userUpn, bool overwriteExistingUserDisk) { return(operations.CopyAsync(srcCollectionName, dstCollectionName, userUpn, overwriteExistingUserDisk, CancellationToken.None)); }
/// <summary> /// Deletes the given user disk. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.RemoteApp.IUserDiskOperations. /// </param> /// <param name='collectionName'> /// Required. The RemoteApp collection name. /// </param> /// <param name='userUpn'> /// Required. The user upn. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> DeleteAsync(this IUserDiskOperations operations, string collectionName, string userUpn) { return(operations.DeleteAsync(collectionName, userUpn, CancellationToken.None)); }
/// <summary> /// Migrate user disks of all the users from a collection to the /// specified azure storage account /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.RemoteApp.IUserDiskOperations. /// </param> /// <param name='collectionName'> /// Required. The collection name. /// </param> /// <param name='targetAccountName'> /// Required. The destination storage account name /// </param> /// <param name='targetAccountKey'> /// Required. The destination storage account key /// </param> /// <param name='targetContainerName'> /// Required. The destination container name /// </param> /// <param name='overwriteExistingUserDisk'> /// Required. A flag denoting if the request is to overwrite the /// existing user disk in the destination storage account /// </param> /// <returns> /// The response containing the operation tracking id. /// </returns> public static Task <OperationResultWithTrackingId> MigrateAsync(this IUserDiskOperations operations, string collectionName, string targetAccountName, string targetAccountKey, string targetContainerName, bool overwriteExistingUserDisk) { return(operations.MigrateAsync(collectionName, targetAccountName, targetAccountKey, targetContainerName, overwriteExistingUserDisk, CancellationToken.None)); }