open-consul/website/content/commands/acl/role/list.mdx

76 lines
1.8 KiB
Plaintext
Raw Normal View History

---
layout: commands
2020-04-07 18:55:19 +00:00
page_title: 'Commands: ACL Role List'
---
# Consul ACL Role List
Command: `consul acl role list`
The `acl role list` command lists all roles. By default it will not show metadata.
## 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'
#### 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.
2020-04-07 18:55:19 +00:00
- `-format={pretty|json}` - Command output format. The default value is `pretty`.
#### Enterprise Options
2020-04-07 18:55:19 +00:00
@include 'http_api_namespace_options.mdx'
## Examples
Default listing.
2020-05-19 18:32:38 +00:00
```shell-session
$ 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
$ 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)
```