/// <summary> /// Creates a Kusto cluster database principalAssignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Kusto cluster. /// </param> /// <param name='clusterName'> /// The name of the Kusto cluster. /// </param> /// <param name='databaseName'> /// The name of the database in the Kusto cluster. /// </param> /// <param name='principalAssignmentName'> /// The name of the Kusto principalAssignment. /// </param> /// <param name='parameters'> /// The Kusto principalAssignments parameters supplied for the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DatabasePrincipalAssignment> CreateOrUpdateAsync(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, string principalAssignmentName, DatabasePrincipalAssignment parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Checks that the database principal assignment is valid and is not already /// in use. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Kusto cluster. /// </param> /// <param name='clusterName'> /// The name of the Kusto cluster. /// </param> /// <param name='databaseName'> /// The name of the database in the Kusto cluster. /// </param> /// <param name='principalAssignmentName'> /// The name of the resource. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CheckNameResult> CheckNameAvailabilityAsync(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a Kusto cluster database principalAssignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Kusto cluster. /// </param> /// <param name='clusterName'> /// The name of the Kusto cluster. /// </param> /// <param name='databaseName'> /// The name of the database in the Kusto cluster. /// </param> /// <param name='principalAssignmentName'> /// The name of the Kusto principalAssignment. /// </param> public static DatabasePrincipalAssignment Get(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, string principalAssignmentName) { return(operations.GetAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).GetAwaiter().GetResult()); }
/// <summary> /// Checks that the database principal assignment is valid and is not already /// in use. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Kusto cluster. /// </param> /// <param name='clusterName'> /// The name of the Kusto cluster. /// </param> /// <param name='databaseName'> /// The name of the database in the Kusto cluster. /// </param> /// <param name='principalAssignmentName'> /// The name of the resource. /// </param> public static CheckNameResult CheckNameAvailability(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName) { return(operations.CheckNameAvailabilityAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).GetAwaiter().GetResult()); }
/// <summary> /// Deletes a Kusto principalAssignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Kusto cluster. /// </param> /// <param name='clusterName'> /// The name of the Kusto cluster. /// </param> /// <param name='databaseName'> /// The name of the database in the Kusto cluster. /// </param> /// <param name='principalAssignmentName'> /// The name of the Kusto principalAssignment. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, string principalAssignmentName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a Kusto principalAssignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Kusto cluster. /// </param> /// <param name='clusterName'> /// The name of the Kusto cluster. /// </param> /// <param name='databaseName'> /// The name of the database in the Kusto cluster. /// </param> /// <param name='principalAssignmentName'> /// The name of the Kusto principalAssignment. /// </param> public static void BeginDelete(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, string principalAssignmentName) { operations.BeginDeleteAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName).GetAwaiter().GetResult(); }
/// <summary> /// Creates a Kusto cluster database principalAssignment. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Kusto cluster. /// </param> /// <param name='clusterName'> /// The name of the Kusto cluster. /// </param> /// <param name='databaseName'> /// The name of the database in the Kusto cluster. /// </param> /// <param name='principalAssignmentName'> /// The name of the Kusto principalAssignment. /// </param> /// <param name='parameters'> /// The Kusto principalAssignments parameters supplied for the operation. /// </param> public static DatabasePrincipalAssignment BeginCreateOrUpdate(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, string principalAssignmentName, DatabasePrincipalAssignment parameters) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists all Kusto cluster database principalAssignments. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group containing the Kusto cluster. /// </param> /// <param name='clusterName'> /// The name of the Kusto cluster. /// </param> /// <param name='databaseName'> /// The name of the database in the Kusto cluster. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <DatabasePrincipalAssignment> > ListAsync(this IDatabasePrincipalAssignmentsOperations operations, string resourceGroupName, string clusterName, string databaseName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }