2017-09-08 02:11:03 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: policy read - Command
|
2017-09-08 02:11:03 +00:00
|
|
|
description: |-
|
|
|
|
The "policy read" command prints the contents and metadata of the Vault policy
|
|
|
|
named NAME. If the policy does not exist, an error is returned.
|
|
|
|
---
|
|
|
|
|
|
|
|
# policy read
|
|
|
|
|
|
|
|
The `policy read` command prints the contents and metadata of the Vault policy
|
|
|
|
named NAME. If the policy does not exist, an error is returned.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Read the policy named "my-policy":
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:11:03 +00:00
|
|
|
$ vault policy read my-policy
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2018-02-12 23:12:16 +00:00
|
|
|
The following flags are available in addition to the [standard set of
|
2020-01-22 20:05:41 +00:00
|
|
|
flags](/docs/commands) included on all commands.
|
2018-02-12 23:12:16 +00:00
|
|
|
|
|
|
|
### Output Options
|
|
|
|
|
|
|
|
- `-format` `(string: "table")` - Print the output in the given format. Valid
|
|
|
|
formats are "table", "json", or "yaml". This can also be specified via the
|
|
|
|
`VAULT_FORMAT` environment variable.
|