mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-24 12:11:11 +01:00
website: add missing @ to example (#5560)
* website: remove mention of `@` in command The command does not contain the mentioned `@` symbol and can be confusing. * docs: use `policy-name` instead of `my-policy` Just making things consistent.
This commit is contained in:
parent
68feb9d244
commit
e89a55ec27
@ -564,10 +564,6 @@ policy in Vault:
|
||||
$ vault policy write policy-name policy-file.hcl
|
||||
```
|
||||
|
||||
-> The `@` tells Vault to read from a file on disk. In the example above, Vault
|
||||
-will read the contents of `my-policy.hcl` in the current working directory into
|
||||
-the value for that parameter.
|
||||
|
||||
or via the API:
|
||||
|
||||
```sh
|
||||
@ -575,10 +571,10 @@ $ curl \
|
||||
--request POST \
|
||||
--header "X-Vault-Token: ..." \
|
||||
--data '{"policy":"path \"...\" {...} "}' \
|
||||
https://vault.hashicorp.rocks/v1/sys/policy/my-policy
|
||||
https://vault.hashicorp.rocks/v1/sys/policy/policy-name
|
||||
```
|
||||
|
||||
In both examples, the name of the policy is "my-policy". You can think of this
|
||||
In both examples, the name of the policy is "policy-name". You can think of this
|
||||
name as a pointer or symlink to the policy ACLs. Tokens are attached policies by
|
||||
name, which are then mapped to the set of rules corresponding to that name.
|
||||
|
||||
@ -607,7 +603,7 @@ $ curl \
|
||||
Existing policies may be deleted via the CLI or API. To delete a policy:
|
||||
|
||||
```sh
|
||||
$ vault delete sys/policy/my-policy
|
||||
$ vault delete sys/policy/policy-name
|
||||
```
|
||||
|
||||
or via the API:
|
||||
@ -616,7 +612,7 @@ or via the API:
|
||||
$ curl \
|
||||
--request DELETE \
|
||||
--header "X-Vault-Token: ..." \
|
||||
https://vault.hashicorp.rocks/v1/sys/policy/my-policy
|
||||
https://vault.hashicorp.rocks/v1/sys/policy/policy-name
|
||||
```
|
||||
|
||||
This is an idempotent operation. Vault will not return an error when deleting a
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user