Skip to main content

updateSecret()

updateSecret(secretId: string, request: UpdateSecretRequest): Promise<Secret>

Defined in: packages/core/src/index.ts:3617

Update an existing secret

Parameters

ParameterTypeDescription
secretIdstringThe unique identifier of the secret
requestUpdateSecretRequestSecret data to update

Returns

Promise<Secret>

The updated secret metadata

Throws

401 - Not authenticated

Throws

404 - Secret not found

Example

import { updateSecret } from "@cpod/sdk";

const updated = await updateSecret("secret-123", {
value: "new-secret-value",
description: "Updated description",
});