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 Read'
|
2020-04-13 18:40:26 +00:00
|
|
|
sidebar_title: read
|
2019-05-01 21:11:23 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Consul ACL Role Read
|
|
|
|
|
|
|
|
Command: `consul acl role read`
|
|
|
|
|
|
|
|
The `acl role read` command reads and displays a roles details.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Usage: `consul acl role read [options] [args]`
|
|
|
|
|
|
|
|
#### 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
|
|
|
- `-id=<string>` - The ID of the role to read. It may be specified as a unique ID
|
|
|
|
prefix but will error if the prefix matches multiple role IDs.
|
2019-05-01 21:11:23 +00:00
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
- `-meta` - Indicates that role metadata such as the content hash and raft
|
2019-05-01 21:11:23 +00:00
|
|
|
indices should be shown for each entry.
|
|
|
|
|
2020-04-07 18:55:19 +00:00
|
|
|
- `-name=<string>` - The name of the role to read.
|
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
|
|
|
|
2019-05-01 21:11:23 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Get role details:
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2019-05-01 21:11:23 +00:00
|
|
|
$ consul acl role read -id 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
|
|
|
|
ID: 57147d87-6bf7-f794-1a6e-7d038c4e4ae9
|
|
|
|
Name: crawler
|
|
|
|
Description: web crawler role
|
|
|
|
Policies:
|
|
|
|
2f8f99c7-edd9-2f09-7e4b-a1f519eb4fc2 - crawler-kv
|
|
|
|
```
|
|
|
|
|
|
|
|
Get role details by name:
|
|
|
|
|
2020-05-19 18:32:38 +00:00
|
|
|
```shell-session
|
2019-05-01 21:11:23 +00:00
|
|
|
$ consul acl role read -name archiver
|
|
|
|
ID: a365fdc9-ac71-e754-0645-7ab6bd747301
|
|
|
|
Name: archiver
|
|
|
|
Description: archiver role
|
|
|
|
Service Identities:
|
|
|
|
archiver (Datacenters: dc2)
|
|
|
|
```
|