/// <summary> /// Gets the notebook workspace for a Cosmos DB account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure resource group. /// </param> /// <param name='accountName'> /// Cosmos DB database account name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <NotebookWorkspace> GetAsync(this INotebookWorkspacesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the notebook workspace for a Cosmos DB account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure resource group. /// </param> /// <param name='accountName'> /// Cosmos DB database account name. /// </param> public static NotebookWorkspace Get(this INotebookWorkspacesOperations operations, string resourceGroupName, string accountName) { return(operations.GetAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Starts the notebook workspace /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure resource group. /// </param> /// <param name='accountName'> /// Cosmos DB database account name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginStartAsync(this INotebookWorkspacesOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Starts the notebook workspace /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure resource group. /// </param> /// <param name='accountName'> /// Cosmos DB database account name. /// </param> public static void BeginStart(this INotebookWorkspacesOperations operations, string resourceGroupName, string accountName) { operations.BeginStartAsync(resourceGroupName, accountName).GetAwaiter().GetResult(); }
/// <summary> /// Gets the notebook workspace resources of an existing Cosmos DB account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure resource group. /// </param> /// <param name='accountName'> /// Cosmos DB database account name. /// </param> public static IEnumerable <NotebookWorkspace> ListByDatabaseAccount(this INotebookWorkspacesOperations operations, string resourceGroupName, string accountName) { return(operations.ListByDatabaseAccountAsync(resourceGroupName, accountName).GetAwaiter().GetResult()); }
/// <summary> /// Regenerates the auth token for the notebook workspace /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure resource group. /// </param> /// <param name='accountName'> /// Cosmos DB database account name. /// </param> public static void RegenerateAuthToken(this INotebookWorkspacesOperations operations, string resourceGroupName, string accountName) { operations.RegenerateAuthTokenAsync(resourceGroupName, accountName).GetAwaiter().GetResult(); }