Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex StoreDoc
  • Getting started
    • All guides
      • SQL queries in Yandex WebSQL
      • Managing databases
      • Managing database users
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Getting a list of cluster databases
  • Creating a database
  • Deleting a database
  1. Step-by-step guides
  2. Databases
  3. Managing databases

Managing databases in Yandex StoreDoc

Written by
Yandex Cloud
Updated at February 6, 2026
  • Getting a list of cluster databases
  • Creating a database
  • Deleting a database

You can add and remove databases, as well as view their details.

Getting a list of cluster databasesGetting a list of cluster databases

Management console
CLI
REST API
gRPC API
  1. Open the folder dashboard.
  2. Navigate to the Yandex StoreDoc service.
  3. Click the name of your cluster and select the Databases tab.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To get a list of cluster databases, run this command:

yc managed-mongodb database list
   --cluster-name <cluster_name>

You can get the cluster name from the list of clusters in your folder.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Call the Database.List method, e.g., via the following cURL request:

    curl \
      --request GET \
      --header "Authorization: Bearer $IAM_TOKEN" \
      --url 'https://mdb.api.cloud.yandex.net/managed-mongodb/v1/clusters/<cluster_ID>/databases'
    

    You can get the cluster ID from the list of clusters in your folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Call the DatabaseService.List method, e.g., via the following gRPCurl request:

    grpcurl \
      -format json \
      -import-path ~/cloudapi/ \
      -import-path ~/cloudapi/third_party/googleapis/ \
      -proto ~/cloudapi/yandex/cloud/mdb/mongodb/v1/database_service.proto \
      -rpc-header "Authorization: Bearer $IAM_TOKEN" \
      -d '{
            "cluster_id": "<cluster_ID>"
          }' \
      mdb.api.cloud.yandex.net:443 \
      yandex.cloud.mdb.mongodb.v1.DatabaseService.List
    

    You can get the cluster ID from the list of clusters in your folder.

  4. Check the server response to make sure your request was successful.

Creating a databaseCreating a database

Note

You can create a maximum of 1000 databases in each cluster.

Management console
CLI
Terraform
REST API
gRPC API
  1. Open the folder dashboard.

  2. Navigate to the Yandex StoreDoc service.

  3. Click the name of your cluster.

  4. Select the Databases tab.

  5. Click Create database.

  6. Specify the database name and click Create.

    A database name may contain Latin letters, numbers, underscores, and hyphens. The name may be up to 63 characters long. Such names as config, local, admin, and mdb_internal are reserved for Yandex StoreDoc. You cannot create DBs with these names.

  7. To grant access to the new database, assign the relevant roles to the required cluster users.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

Run the database create command, providing the new database name:

yc managed-mongodb database create <DB_name>
  --cluster-name <cluster_name>

A database name may contain Latin letters, numbers, underscores, and hyphens. The name may be up to 63 characters long. Such names as config, local, admin, and mdb_internal are reserved for Yandex StoreDoc. You cannot create DBs with these names.

You can get the cluster name from the list of clusters in your folder.

Yandex StoreDoc will start the database creation process.

Assign access permissions for the new database to the required cluster users.

  1. Open the current Terraform configuration file describing your infrastructure.

    To learn how to create this file, see Creating a cluster.

  2. Add the yandex_mdb_mongodb_database resource:

    resource "yandex_mdb_mongodb_database" "<DB_name>" {
      cluster_id = "<cluster_ID>"
      name       = "<DB_name>"
    }
    

    A database name may contain Latin letters, numbers, underscores, and hyphens. The name may be up to 63 characters long. Such names as config, local, admin, and mdb_internal are reserved for Yandex StoreDoc. You cannot create DBs with these names.

  3. Validate your configuration.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm resource changes.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Call the Database.Create method, e.g., via the following cURL request:

    curl \
      --request POST \
      --header "Authorization: Bearer $IAM_TOKEN" \
      --header "Content-Type: application/json" \
      --url 'https://mdb.api.cloud.yandex.net/managed-mongodb/v1/clusters/<cluster_ID>/databases' \
      --data '{
                "databaseSpec": {
                  "name": "<DB_name>"
                }
              }'
    

    Where databaseSpec is the object containing the new database name.

    A database name may contain Latin letters, numbers, underscores, and hyphens. The name may be up to 63 characters long. Such names as config, local, admin, and mdb_internal are reserved for Yandex StoreDoc. You cannot create DBs with these names.

    You can get the cluster ID from the list of clusters in your folder.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Call the DatabaseService.Create method, e.g., via the following gRPCurl request:

    grpcurl \
      -format json \
      -import-path ~/cloudapi/ \
      -import-path ~/cloudapi/third_party/googleapis/ \
      -proto ~/cloudapi/yandex/cloud/mdb/mongodb/v1/database_service.proto \
      -rpc-header "Authorization: Bearer $IAM_TOKEN" \
      -d '{
            "cluster_id": "<cluster_ID>",
            "database_spec": {
              "name": "<DB_name>"
            }
          }' \
      mdb.api.cloud.yandex.net:443 \
      yandex.cloud.mdb.mongodb.v1.DatabaseService.Create
    

    Where database_spec is the object containing the new database name.

    A database name may contain Latin letters, numbers, underscores, and hyphens. The name may be up to 63 characters long. Such names as config, local, admin, and mdb_internal are reserved for Yandex StoreDoc. You cannot create DBs with these names.

    You can get the cluster ID from the list of clusters in your folder.

  4. Check the server response to make sure your request was successful.

Deleting a databaseDeleting a database

Management console
CLI
Terraform
REST API
gRPC API
  1. Open the folder dashboard.
  2. Navigate to the Yandex StoreDoc service.
  3. Click the name of your cluster and select the Databases tab.
  4. Find the database you need in the list, click in its row, and select Delete.

If you do not have the Yandex Cloud CLI installed yet, install and initialize it.

By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.

To delete a database, run this command:

yc managed-mongodb database delete <DB_name>
   --cluster-name <cluster_name>

You can get the cluster name from the list of clusters in your folder.

  1. Open the current Terraform configuration file describing your infrastructure.

    To learn how to create this file, see Creating a cluster.

  2. Remove the yandex_mdb_mongodb_database resource with the name of the database you want to delete.

  3. Validate your configuration.

    1. In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.

    2. Run this command:

      terraform validate
      

      Terraform will show any errors found in your configuration files.

  4. Confirm resource changes.

    1. Run this command to view the planned changes:

      terraform plan
      

      If you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.

    2. If everything looks correct, apply the changes:

      1. Run this command:

        terraform apply
        
      2. Confirm updating the resources.

      3. Wait for the operation to complete.

For more information, see this Terraform provider guide.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Call the Database.Delete method, e.g., via the following cURL request:

    curl \
      --request DELETE \
      --header "Authorization: Bearer $IAM_TOKEN" \
      --url 'https://mdb.api.cloud.yandex.net/managed-mongodb/v1/clusters/<cluster_ID>/databases/<DB_name>'
    

    You can get the cluster ID from the list of clusters in your folder, and the database name from the list of databases in your cluster.

  3. Check the server response to make sure your request was successful.

  1. Get an IAM token for API authentication and place it in an environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Clone the cloudapi repository:

    cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
    

    Below, we assume that the repository contents reside in the ~/cloudapi/ directory.

  3. Call the DatabaseService.Delete method, e.g., via the following gRPCurl request:

    grpcurl \
      -format json \
      -import-path ~/cloudapi/ \
      -import-path ~/cloudapi/third_party/googleapis/ \
      -proto ~/cloudapi/yandex/cloud/mdb/mongodb/v1/database_service.proto \
      -rpc-header "Authorization: Bearer $IAM_TOKEN" \
      -d '{
            "cluster_id": "<cluster_ID>",
            "database_name": "<DB_name>"
          }' \
      mdb.api.cloud.yandex.net:443 \
      yandex.cloud.mdb.mongodb.v1.DatabaseService.Delete
    

    You can get the cluster ID from the list of clusters in your folder, and the database name from the list of databases in your cluster.

  4. Check the server response to make sure your request was successful.

Warning

If you plan to create a new database with the same name, wait for the deletion to complete. Otherwise, the system will restore the original database. You can check the operation status in the list of cluster operations.

Was the article helpful?

Previous
SQL queries in Yandex WebSQL
Next
Managing database users
© 2026 Direct Cursus Technology L.L.C.