Python - secret.version()
Returns a reference to a known version of a secret.
from nitric.resources import secret
from nitric.application import Nitric
keyRef = secret('apiKey').allow('access')
keyValue = await keyRef.version('the-version-id')
Nitric.run()
Parameters
- Name
version
- Required
- Required
- Type
- string
- Description
The version id. This value is returned from secret.put().
Examples
Return a reference to a known secret version
from nitric.resources import secret
from nitric.application import Nitric
key_ref = secret('apiKey').allow('access')
key_value = await key_ref.version('the-version-id')
Nitric.run()