updateSecret( )


Updates the specified fields of an existing secret by ID.

The updateSecret() function returns a Promise that resolves when the secret is successfully updated. You can update one or more secret properties. Only the properties passed in the Secret object will be updated. All other properties will remain the same. You can retrieve the id parameter from the listSecretInfo() function. The id is not the same as the secret name used by the getSecret() function.

Notes:

  • Changing a secret's name or value will break all code using the secret.

  • You cannot rename the secret with a name that is already in use.

  • Do not leave private keys in your code! Leaving them in is a security risk. Either delete the keys from the code after running updateSecret(), or pass the parameters in using the Functional Testing tool.

Method Declaration
Copy
Method Parameters
idstringRequired

The ID of the secret to update.


secretSecretUpdateInfoRequired

The information to update the secret with.

Was this helpful?
Yes
No