Method ListUsersAsync
ListUsersAsync(AdminOptions, CancellationToken)
On-premise only. Returns the users in the store as a list of
UserInfo objects.
Declaration
public Task<IReadOnlyList<UserInfo>> ListUsersAsync(AdminOptions options = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
AdminOptions | options | (Optional) Options for admin DDL operation.
If not specified or null , appropriate defaults
will be used. See AdminOptions. |
CancellationToken | cancellationToken | (Optional) Cancellation token. |
Returns
Type | Description |
---|---|
Task<IReadOnlyList<UserInfo>> | Task returning a list of UserInfo objects. |
Remarks
If no users are found, empty list is returned. This operation
involves performing admin DDL SHOW USERS command.
Exceptions
Type | Condition |
---|---|
ArgumentException | If options
contains invalid values. |
TimeoutException | Operation has timed out. |
InvalidOperationException | The system is not in a valid state to perform this operation. |
BadProtocolException | If received invalid output from the SHOW USERS command. |
NoSQLException | NoSQLException or one of its subclasses is thrown if operation cannot be performed for any other reason. See documentation for corresponding subclass of NoSQLException. |