Nitric logo

Secrets

secret.version()

Returns a reference to a known version of a secret.

from nitric.resources import secret

keyRef = secret('apiKey').allow('accessing')

keyValue = await keyRef.version('the-version-id')

Parameters


version required string

The version id. This value is returned from secret.put()


Examples

Return a reference to a known secret version

from nitric.resources import secret

key_ref = secret('apiKey').allow('accessing')

key_value = await key_ref.version('the-version-id')

See Also

Previous
secret.put()