Create a ticket
Sign in Sign up
Locker support Locker support
Results

No results found.

Home Locker Secrets Manager Developer tools Secrets - SDK NodeJS Usages Update a secrets
Vietnamese English
Update a secrets

Methods:

  • modify: edit a secret’s value, environmentName, or description. You cannot change the secret’s key. You also cannot change the environment to a new one that already had a secret with the same name. Returns the updated secret

modify: (key: string, env: string, data: { value: string; environmentName?: string; description?: string }) => Promise<Secret>

Example

// Update the secret "key" of env "ALL"
const secret = await locker.modify('key', '', {
  value: 'value 2',
	description: 'desc'
})

// Update the secret "key" of env "prod"
const secret = await locker.modify('key', 'prod', {
  value: 'value 2',
	environmentName: 'prod'
})

// This will update the env from "prod" to "ALL"
const secret = await locker.modify('key', 'prod', {
  value: 'value 2'
})

// This will update the env from "ALL" to "prod"
const secret = await locker.modify('key', '', {
  value: 'value 2',
	environmentName: 'prod'
})
 
Was this page helpful?
No
Yes
Join Our Community