LIST ROLES

Lists roles and shows superuser and login status.

Lists roles and shows superuser and login status.
Restriction: Roles have describe permission on their own and any inherited roles. Describe permission is required to list a role other than the current role.

Synopsis

LIST ROLES 
  [ OF role_name ] 
  [ NORECURSIVE ] ;
Table 1. Legend
Syntax conventions Description
UPPERCASE Literal keyword.
Lowercase Not literal.
Italics Variable value. Replace with a user-defined value.
[] Optional. Square brackets ( [] ) surround optional command arguments. Do not type the square brackets.
( ) Group. Parentheses ( ( ) ) identify a group to choose from. Do not type the parentheses.
| Or. A vertical bar ( | ) separates alternative elements. Type any one of the elements. Do not type the vertical bar.
... Repeatable. An ellipsis ( ... ) indicates that you can repeat the syntax element as often as required.
'Literal string' Single quotation ( ' ) marks must surround literal strings in CQL statements. Use single quotation marks to preserve upper case.
{ key : value } Map collection. Braces ( { } ) enclose map collections or key value pairs. A colon separates the key and the value.
<datatype1,datatype2> Set, list, map, or tuple. Angle brackets ( < > ) enclose data types in a set, list, map, or tuple. Separate the data types with a comma.
cql_statement; End CQL statement. A semicolon ( ; ) terminates all CQL statements.
[--] Separate the command line options from the command arguments with two hyphens ( -- ). This syntax is useful when arguments might be mistaken for command line options.

Examples

Show all the roles that the current role has permission to describe.
LIST ROLES;
Returns all roles:
 role                       | super | login | options
----------------------------+-------+-------+---------
                      alice | False |  True |        {}
                  cassandra |  True |  True |        {}
              cycling_admin | False | False |        {}
            cycling_analyst | False | False |        {}
                cycling_app | False |  True |        {}
 cycling_expense_management | False | False |        {}
                   dantest1 | False |  True |        {}
             hockey_analyst | False | False |        {}
                       jane | False |  True |        {}
                      jason | False |  True |        {}
                       john | False |  True |        {}
             keyspace_admin | False | False |        {}
                     martin | False |  True |        {}
                  read_race | False | False |        {}
                 role_admin | False | False |        {}
                       root |  True |  True |        {}
                      sandy | False |  True |        {}
                  sys_admin | False |  True |        {}
            update_accounts | False | False |        {}
               update_races | False | False |        {}
               update_teams | False | False |        {}

(21 rows)
Show the roles for a particular role. Sufficient privileges are required to show this information.
LIST ROLES OF martin;
Returns only the roles assigned to martin:
 role           | super | login | options
----------------+-------+-------+---------
 keyspace_admin | False | False |        {}
         martin | False |  True |        {}

(2 rows)