deleteSecret( )

Deletes an existing secret by ID.

The deleteSecret() function returns a Promise that resolves when a secret from the Secrets Manager is deleted. You can retrieve the id parameter using the listSecretInfo() function. Note that the ID used here is the ID retrieved from listSecretInfo(), not the secret name used by getSecret().

Note: Deleting a secret is irreversible and will break all code using the secret.

Method Declaration
Method Parameters

The ID of the secret to be deleted.

Was this helpful?