Skip to content
Ona Docs

UpdateSecretValue

client.secrets.updateValue(SecretUpdateValueParams { secretId, value } body, RequestOptionsoptions?): SecretUpdateValueResponse
POST/gitpod.v1.SecretService/UpdateSecretValue

Updates the value of an existing secret.

Use this method to:

  • Rotate secret values
  • Update credentials

Examples

  • Update secret value:

    Changes the value of an existing secret.

    secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    value: "new-secret-value"
ParametersExpand Collapse
body: SecretUpdateValueParams { secretId, value }
secretId?: string
formatuuid
value?: string

value is the plaintext value of the secret

maxLength10240
minLength1
ReturnsExpand Collapse
SecretUpdateValueResponse = unknown

UpdateSecretValue

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const response = await client.secrets.updateValue({
  secretId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
  value: 'new-secret-value',
});

console.log(response);
{}
Returns Examples
{}