# secrets

## Description

Exposes metadata about secrets in the organization. Secret values are never exposed — only the name, type, and status are visible. Only secrets on which the current role has USAGE privileges are returned.

{% hint style="info" %}
**Note** Secret values are never returned by this table. Only metadata (name, type, status) is accessible.
{% endhint %}

## Syntax

```sql
SELECT * FROM deltastream.sys."secrets";
```

## Columns

| Column                    | Type           | Nullable | Description                                                         |
| ------------------------- | -------------- | -------- | ------------------------------------------------------------------- |
| `name`                    | VARCHAR        | No       | Name of the secret.                                                 |
| `type`                    | VARCHAR        | No       | Type of the secret, e.g. `generic`.                                 |
| `status`                  | VARCHAR        | No       | Current status of the secret. One of `ready`, `error`.              |
| `description`             | VARCHAR        | Yes      | Optional description of the secret.                                 |
| `owner`                   | VARCHAR        | No       | The role that owns this resource.                                   |
| `created_by_role`         | VARCHAR        | No       | The role that created this resource.                                |
| `created_by_role_deleted` | BOOLEAN        | No       | Whether the creating role has since been deleted.                   |
| `created_by`              | VARCHAR        | No       | The user that created this resource.                                |
| `created_at`              | TIMESTAMP\_LTZ | No       | Timestamp when this resource was created.                           |
| `updated_by_role`         | VARCHAR        | Yes      | The role that last updated this resource.                           |
| `updated_by_role_deleted` | BOOLEAN        | Yes      | Whether the last updating role has since been deleted.              |
| `updated_by`              | VARCHAR        | Yes      | The user that last updated this resource.                           |
| `updated_at`              | TIMESTAMP\_LTZ | No       | Timestamp when this resource was last updated.                      |
| `organization_id`         | VARCHAR        | No       | The unique identifier of the organization this resource belongs to. |

## Examples

```sh
$ dsql -e 'SELECT * FROM deltastream.sys."secrets";'
[]
```

## See Also

* [System Tables Overview](https://docs.deltastream.io/reference/sql-syntax/systables)
* [LIST SECRETS](https://docs.deltastream.io/reference/sql-syntax/command/list-secrets)
* [CREATE SECRET](https://docs.deltastream.io/reference/sql-syntax/ddl/create-secret)
