system.secrets.readConfiguredSecretValue
New in 8.3.8
This function is used in Python Scripting.
Descriptionβ
Reads the value of a secret configured by its SecretConfig.
Syntaxβ
system.secrets.readConfiguredSecretValue(secretConfig)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| PyObject | secretConfig | The JSON object containing the SecretConfig. |
Returnsβ
PyPlaintext - A PyPlaintext instance containing the specified secret.
Raisesβ
ValueError - Throws a ValueError if there is no JSON.
SecretException - Throws a SecretException if there is a problem reading the secret.
JsonParseException - Throws a JsonParseException if there is a problem parsing the SecretConfig from the given argument.
Scopeβ
Gateway, Vision Client, Perspective Session
Code Examplesβ
Code Snippet
# This example will create an embedded secret that an operator can use and prints it to
# a label component on the same view.
# Create the embedded secret
cipher = system.secrets.encrypt('password')
embeddedSecret = system.secrets.createEmbeddedSecretConfig(cipher)
# Print it to a label component
self.getSibling("Label").props.text = system.secrets.readConfiguredSecretValue(embeddedSecret).getSecretAsString()