Chapter 57. role


This chapter describes the commands under the role command.

57.1. role add

Usage:

openstack role add [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN]

                        [--max-width <integer>] [--fit-width]
                        [--print-empty] [--noindent] [--prefix PREFIX]
                        --project <project> --user <user>
                        <role>
Copy to Clipboard Toggle word wrap

Add role to project:user

Expand
Table 57.1. Positional Arguments
ValueSummary

<role>

Role to add to <project>:<user> (name or id)

Expand
Table 57.2. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--project <project>

Include <project> (name or id)

--user <user>

Include <user> (name or id)

Expand
Table 57.3. Output Formatters
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

Expand
Table 57.4. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 57.5. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 57.6. shell formatter
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

57.2. role assignment list

Usage:

openstack role assignment list [-h] [-f {csv,json,table,value,yaml}]

                                    [-c COLUMN] [--max-width <integer>]
                                    [--fit-width] [--print-empty]
                                    [--noindent]
                                    [--quote {all,minimal,none,nonnumeric}]
                                    [--sort-column SORT_COLUMN]
                                    [--user <user>] [--project <project>]
                                    [--names] [--auth-user] [--auth-project]
Copy to Clipboard Toggle word wrap

List role assignments

Expand
Table 57.7. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--user <user>

User to filter (name or id)

--project <project>

Project to filter (name or id)

--names

Display names instead of ids

--auth-user

Only list assignments for the authenticated user

--auth-project

Only list assignments for the project to which the authenticated user’s token is scoped

Expand
Table 57.8. Output Formatters
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

Expand
Table 57.9. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 57.10. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 57.11. CSV Formatter
ValueSummary

--quote {all,minimal,none,nonnumeric}

when to include quotes, defaults to nonnumeric

57.3. role create

Usage:

openstack role create [-h] [-f {json,shell,table,value,yaml}]

                           [-c COLUMN] [--max-width <integer>] [--fit-width]
                           [--print-empty] [--noindent] [--prefix PREFIX]
                           [--or-show]
                           <name>
Copy to Clipboard Toggle word wrap

Create new role

Expand
Table 57.12. Positional Arguments
ValueSummary

<name>

New role name

Expand
Table 57.13. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--or-show

Return existing role

Expand
Table 57.14. Output Formatters
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

Expand
Table 57.15. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 57.16. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 57.17. shell formatter
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

57.4. role delete

Usage:

openstack role delete [-h] <role> [<role> ...]
Copy to Clipboard Toggle word wrap

Delete role(s)

Expand
Table 57.18. Positional Arguments
ValueSummary

<role>

Role(s) to delete (name or id)

Expand
Table 57.19. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

57.5. role list

Usage:

openstack role list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]

                         [--max-width <integer>] [--fit-width]
                         [--print-empty] [--noindent]
                         [--quote {all,minimal,none,nonnumeric}]
                         [--sort-column SORT_COLUMN] [--project <project>]
                         [--user <user>]
Copy to Clipboard Toggle word wrap

List roles

Expand
Table 57.20. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--project <project>

Filter roles by <project> (name or id)

--user <user>

Filter roles by <user> (name or id)

Expand
Table 57.21. Output Formatters
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

--sort-column SORT_COLUMN

specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

Expand
Table 57.22. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 57.23. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 57.24. CSV Formatter
ValueSummary

--quote {all,minimal,none,nonnumeric}

when to include quotes, defaults to nonnumeric

57.6. role remove

Usage:

openstack role remove [-h] --project <project> --user <user> <role>
Copy to Clipboard Toggle word wrap

Remove role from project : user

Expand
Table 57.25. Positional Arguments
ValueSummary

<role>

Role to remove (name or id)

Expand
Table 57.26. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

--project <project>

Include <project> (name or id)

--user <user>

Include <user> (name or id)

57.7. role show

Usage:

openstack role show [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN]

                         [--max-width <integer>] [--fit-width]
                         [--print-empty] [--noindent] [--prefix PREFIX]
                         <role>
Copy to Clipboard Toggle word wrap

Display role details

Expand
Table 57.27. Positional Arguments
ValueSummary

<role>

Role to display (name or id)

Expand
Table 57.28. Optional Arguments
ValueSummary

-h, --help

Show this help message and exit

Expand
Table 57.29. Output Formatters
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

the output format, defaults to table

-c COLUMN, --column COLUMN

specify the column(s) to include, can be repeated

Expand
Table 57.30. Table Formatter
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Expand
Table 57.31. JSON Formatter
ValueSummary

--noindent

Whether to disable indenting the json

Expand
Table 57.32. shell formatter
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat