/// <summary> /// Assigns the specified workspace to the specified capacity. /// </summary> /// <remarks> /// **Note**: To perform this operation, the user must be admin on the /// specified workspace and have admin or assign permissions on the capacity. /// To unassign the specified workspace from a capacity, Empty Guid /// (00000000-0000-0000-0000-000000000000) should be provided as capacityId. /// <br/><br/>**Required scope**: Capacity.ReadWrite.All and /// Workspace.ReadWrite.All <br/>To set the permissions scope, see /// [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app). /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='groupId'> /// The workspace id /// </param> /// <param name='requestParameters'> /// Assign to capacity parameters /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AssignToCapacityAsync(this IGroupsOperations operations, System.Guid groupId, AssignToCapacityRequest requestParameters, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.AssignToCapacityWithHttpMessagesAsync(groupId, requestParameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }