Skip to content
Ona Docs

DeleteSecret

client.secrets.delete(SecretDeleteParams { secretId } body, RequestOptionsoptions?): SecretDeleteResponse
POST/gitpod.v1.SecretService/DeleteSecret

Deletes a secret permanently.

Use this method to:

  • Remove unused secrets
  • Clean up old credentials

Examples

  • Delete secret:

    Permanently removes a secret.

    secretId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
ParametersExpand Collapse
body: SecretDeleteParams { secretId }
secretId?: string
formatuuid
ReturnsExpand Collapse
SecretDeleteResponse = unknown

DeleteSecret

import Gitpod from '@gitpod/sdk';

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

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

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