HashiCorp Vault REST API has an endpoint to generate (signed) cert and key: /pki/issue/:name
Official docs: https://developer.hashicorp.com/vault/api-docs/secret/pki#generate-certificate-and-key
In the body of the request, there is a JSON object key "ttl"
for time-to-live. What are the supported value formats for this key?
I cannot find supported formats in official docs. By luck, I found other examples that allow suffices "h"
for hours, e.g., "360h"
, and "d"
for days, e.g., "7d"
.
It expects a time duration string parsable by Go time.ParseDuration
.