Method ListRolesAsync
ListRolesAsync(AdminOptions, CancellationToken)
On-premise only. Returns the roles in the store as a list of
strings.
Declaration
public Task<IReadOnlyList<string>> ListRolesAsync(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<String>> | Task returning a list of namespaces as strings. |
Remarks
If no roles are found, empty list is returned. This operation
involves performing admin DDL SHOW ROLES 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 ROLES 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. |