open-vault/website/content/docs/commands/policy/index.mdx
Ashlee M Boyer f3df55ad58
docs: Migrate link formats (#18696)
* Adding check-legacy-links-format workflow

* Adding test-link-rewrites workflow

* Updating docs-content-check-legacy-links-format hash

* Migrating links to new format

Co-authored-by: Kendall Strautman <kendallstrautman@gmail.com>
2023-01-25 16:12:15 -08:00

53 lines
1.1 KiB
Plaintext

---
layout: docs
page_title: policy - Command
description: |-
The "policy" command groups subcommands for interacting with policies. Users
can write, read, and list policies in Vault.
---
# policy
The `policy` command groups subcommands for interacting with policies. Users can
write, read, and list policies in Vault.
For more information, please see the [policy
documentation](/vault/docs/concepts/policies).
## Examples
List all enabled policies:
```shell-session
$ vault policy list
```
Create a policy named "my-policy" from contents on local disk:
```shell-session
$ vault policy write my-policy ./my-policy.hcl
```
Delete the policy named my-policy:
```shell-session
$ vault policy delete my-policy
```
## Usage
```text
Usage: vault policy <subcommand> [options] [args]
# ...
Subcommands:
delete Deletes a policy by name
list Lists the installed policies
read Prints the contents of a policy
write Uploads a named policy from a file
```
For more information, examples, and usage about a subcommand, click on the name
of the subcommand in the sidebar.