Some generic docs updates

This commit is contained in:
Jeff Mitchell 2016-03-18 09:57:21 -04:00
parent d97b077db1
commit 49d1e7a087

View file

@ -28,19 +28,18 @@ secret's path.
## Quick Start
The generic backend allows for writing keys with arbitrary values. A `ttl` value
can be provided, which affects the duration of generated leases. Specifically,
this can be used as a hint from the writer of a secret to consumers of a secret
that the consumer should wait no more than the `ttl` duration before checking
for a new value. If you expect a secret to change frequently, or if you need
clients to react quickly to a change in the secret's value, specify a low value
of `ttl`. Keep in mind that a low `ttl` value may add significant additional load
to the Vault server if it results in clients accessing the value very frequently.
Also note that setting `ttl` does not actually expire the data; it is
informational only.
The generic backend allows for writing keys with arbitrary values. A `ttl`
value can be provided, which is parsed into seconds and round-tripped as the
`lease_duration` parameter in requests. Specifically, this can be used as a
hint from the writer of a secret to consumers of a secret that the consumer
should wait no more than the `ttl` duration before checking for a new value. If
you expect a secret to change frequently, or if you need clients to react
quickly to a change in the secret's value, specify a low value of `ttl`. Also
note that setting `ttl` does not actually expire the data; it is informational
only.
As an example, we can write a new key "foo" to the generic backend
mounted at "secret/" by default:
As an example, we can write a new key "foo" to the generic backend mounted at
"secret/" by default:
```
$ vault write secret/foo \
@ -56,11 +55,12 @@ We can test this by doing a read:
$ vault read secret/foo
Key Value
lease_duration 3600
ttl 1h
zip zap
```
As expected, we get the value previously set back as well as our custom TTL
both as specified and translated to seconds. The TTL has been set to 3600
both as specified and translated to seconds. The duration has been set to 3600
seconds (one hour) as specified.
## API