---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/yql/reference/syntax/create-object-type-secret.md?version=v25.3
  - https://ydb.tech/docs/ru/yql/reference/syntax/create-object-type-secret.md?version=v25.3
  - href: en/yql/reference/syntax/create-object-type-secret.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/yql/reference/syntax/create-object-type-secret.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# CREATE OBJECT (TYPE SECRET)

{% note warning %}

The syntax for managing secrets will change in future YDB releases.

{% endnote %}

The `CREATE OBJECT (TYPE SECRET)` statement creates a [secret](https://ydb.tech/docs/en/concepts/datamodel/secrets.md?version=v25.3).

## Syntax {#syntax}

```yql
CREATE OBJECT <secret_name> (TYPE SECRET) WITH value="<secret_value>";
```

### Parameters

* `secret_name` - the name of the secret.
* `secret_value` - the contents of the secret.

## Example {#examples}

The following statement creates a secret named `MySecretName` with `MySecretData` as a value.

```yql
CREATE OBJECT MySecretName (TYPE SECRET) WITH value="MySecretData";
```
