2019-05-01 21:11:23 +00:00
|
|
|
---
|
2020-09-01 15:14:13 +00:00
|
|
|
layout: commands
|
2020-04-07 18:55:19 +00:00
|
|
|
page_title: 'Commands: ACL Role List'
|
2019-05-01 21:11:23 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Consul ACL Role List
|
|
|
|
|
|
|
|
Command: `consul acl role list`
|
|
|
|
|
2022-01-11 13:26:58 +00:00
|
|
|
Corresponding HTTP API Endpoint: [\[GET\] /v1/acl/roles](/api-docs/acl/roles#list-roles)
|
2022-01-10 17:40:11 +00:00
|
|
|
|
2019-05-01 21:11:23 +00:00
|
|
|
The `acl role list` command lists all roles. By default it will not show metadata.
|
|
|
|
|
2022-01-10 21:44:56 +00:00
|
|
|
The table below shows this command's [required ACLs](/api#authentication). Configuration of
|
2022-03-30 21:16:26 +00:00
|
|
|
[blocking queries](/api-docs/features/blocking) and [agent caching](/api-docs/features/caching)
|
2022-01-10 21:44:56 +00:00
|
|
|
are not supported from commands, but may be from the corresponding HTTP endpoint.
|
|
|
|
|
|
|
|
| ACL Required |
|
|
|
|
| ------------ |
|
|
|
|
| `acl:read` |
|
|
|
|
|
2019-05-01 21:11:23 +00:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
Usage: `consul acl role list`
|
|
|
|
|
|
|
|
#### API Options
|
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
@include 'http_api_options_client.mdx'
|
2020-04-07 23:56:08 +00:00
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
@include 'http_api_options_server.mdx'
|
2019-05-01 21:11:23 +00:00
|
|
|
|
|
|
|
#### Command Options
|
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
- `-meta` - Indicates that role metadata such as the content hash and
|
|
|
|
Raft indices should be shown for each entry.
|
2019-05-01 21:11:23 +00:00
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
- `-format={pretty|json}` - Command output format. The default value is `pretty`.
|
2020-03-26 16:03:22 +00:00
|
|
|
|
2019-12-06 16:14:56 +00:00
|
|
|
#### Enterprise Options
|
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
@include 'http_api_namespace_options.mdx'
|
2019-12-06 16:14:56 +00:00
|
|
|
|
2021-12-15 01:55:21 +00:00
|
|
|
@include 'http_api_partition_options.mdx'
|
|
|
|
|
2019-05-01 21:11:23 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Default listing.
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2019-05-01 21:11:23 +00:00
|
|
|
$ consul acl role list
|
|
|
|
web-crawler:
|
|
|
|
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
|
|
|
|
Description: web crawler updated role
|
|
|
|
Policies:
|
|
|
|
2f8f99c7-edd9-2f09-7e4b-a1f519eb4fc2 - crawler-kv
|
|
|
|
Service Identities:
|
|
|
|
crawler (Datacenters: all)
|
|
|
|
archiver:
|
|
|
|
ID: a365fdc9-ac71-e754-0645-7ab6bd747301
|
|
|
|
Description: archiver role
|
|
|
|
Service Identities:
|
|
|
|
archiver (Datacenters: dc2)
|
|
|
|
```
|
|
|
|
|
|
|
|
Show Metadata.
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2019-05-01 21:11:23 +00:00
|
|
|
$ consul acl role list -meta
|
|
|
|
web-crawler:
|
|
|
|
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
|
|
|
|
Description: web crawler updated role
|
|
|
|
Hash: 3bd7c15a77c8d1d45c515378f1176df2e6f76d9c96d541f96de8272ff4dba7b5
|
|
|
|
Create Index: 18
|
|
|
|
Modify Index: 39
|
|
|
|
Policies:
|
|
|
|
2f8f99c7-edd9-2f09-7e4b-a1f519eb4fc2 - crawler-kv
|
|
|
|
Service Identities:
|
|
|
|
crawler (Datacenters: all)
|
|
|
|
archiver:
|
|
|
|
ID: a365fdc9-ac71-e754-0645-7ab6bd747301
|
|
|
|
Description: archiver role
|
|
|
|
Hash: 9af397ea92ee901366d6333c658195be16f4aee8aa64d2b529b921c879b70a58
|
|
|
|
Create Index: 22
|
|
|
|
Modify Index: 22
|
|
|
|
Service Identities:
|
|
|
|
archiver (Datacenters: dc2)
|
|
|
|
```
|