Skip to content

Commit

Permalink
add (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
WanYixian authored Feb 10, 2025
1 parent 036338b commit 8e9764d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@
"sql/commands/sql-alter-index",
"sql/commands/sql-alter-materialized-view",
"sql/commands/sql-alter-schema",
"sql/commands/sql-alter-secret",
"sql/commands/sql-alter-sink",
"sql/commands/sql-alter-source",
"sql/commands/sql-alter-subscription",
Expand Down
53 changes: 53 additions & 0 deletions sql/commands/sql-alter-secret.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: "ALTER SECRET"
description: "Use the `ALTER SECRET` command to alter the secrets that store sensitive credentials."
---


Altering a secret does not change the secret used in a running job until the job is restarted (e.g., by restarting the cluster).

## Syntax

```sql
ALTER SECRET secret_name WITH (
backend = 'meta'
) AS 'your_new_secret';
```

## Parameters

| Parameter or Clause | Description |
| :------------------ | :---------------------------------------------------------------------------------------------------- |
| `secret_name` | The name of the secret to be altered. |
| `backend` | The backend where the secret is stored. Currently, only the meta backend is supported. |
| `your_new_secret` | The new secret value that you wish to store securely. |

## Example

```sql
ALTER SECRET mysql_pwd WITH (
backend = 'meta'
) AS 'new_password';
```

## See also


<CardGroup>
<Card
title="Manage secrets"
icon="key"
icontype="solid"
href="/operate/manage-secrets"
>
A comprehensive guide for secret management operations
</Card>
<Card
title="CREATE SECRET"
icon="plus"
iconType="solid"
href="/sql/commands/sql-create-secret"
>
Create a secret
</Card>
</CardGroup>

0 comments on commit 8e9764d

Please sign in to comment.