Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for OpenSearch
  • Getting started
    • All guides
      • Information about existing clusters
      • Creating a cluster
        • Updating cluster settings
        • OpenSearch version upgrade
        • Managing plugins
      • Stopping and starting a cluster
      • Managing backups
      • Configuring access to Object Storage
      • Deleting a cluster
    • User management
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Changing a service account
  • Changing the admin password
  • Changing OpenSearch settings
  • Changing additional cluster settings
  • Changing security groups
  1. Step-by-step guides
  2. Clusters
  3. Updating parameters
  4. Updating cluster settings

Updating OpenSearch cluster settings

Written by
Yandex Cloud
Updated at May 13, 2025
  • Changing a service account
  • Changing the admin password
  • Changing OpenSearch settings
  • Changing additional cluster settings
  • Changing security groups

After creating a cluster, you can change:

  • Service account.
  • admin user password.
  • OpenSearch settings.
  • Additional cluster settings.
  • Security groups.

You can also:

  • Update the OpenSearch version.
  • Change the host group configuration.
  • Move host groups to a different availability zone.

Changing a service accountChanging a service account

To link your service account to a Managed Service for OpenSearch cluster, assign the iam.serviceAccounts.user role or higher to your Yandex Cloud account.

Warning

If the cluster already uses a service account to access objects from Object Storage, then changing it to a different service account may make these objects unavailable and interrupt the cluster operation. Before changing the service account settings, make sure that the cluster doesn't use the objects in question.

For more information about setting up a service account, see Configuring access to Object Storage.

Management console
CLI
Terraform
REST API
gRPC API

To change a service account linked to a Managed Service for OpenSearch cluster:

  1. In the management console, navigate to the folder page and select Managed Service for OpenSearch.
  2. Select a cluster and click Edit in the top panel.
  3. In the Service account field, select the account you need from the list or create a new one. For more information about setting up a service account, see Configuring access to Object Storage.
  4. Click Save.

If you do not have the Yandex Cloud (CLI) command line interface yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To change a service account linked to a Managed Service for OpenSearch cluster, run the command:

yc managed-opensearch cluster update <cluster_name_or_ID> \
   --service-account-name <service_account_name>

You can request the cluster name and ID with the list of clusters in the folder.

For more information about setting up a service account, see Configuring access to Object Storage.

To change a service account linked to a Managed Service for OpenSearch cluster:

  1. Open the current Terraform configuration file that defines your infrastructure.

    For a complete list of available Managed Service for OpenSearch cluster configuration fields, see the Terraform provider documentation.

  2. In the service_account_id field, specify the service account ID:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
        ...
        service_account_id = "<service_account_ID>"
    }
    

    For more information about setting up a service account, see Configuring access to Object Storage.

  3. Make sure the settings are correct.

    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 updating the resources.

    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.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.Update method and send the following request, e.g., via cURL:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>' \
        --data '{
                    "updateMask": "serviceAccountId",
                    "serviceAccountId": "<service_account_ID>"
                }'
    

    Where:

    • updateMask: List of parameters to update as a single string, separated by commas.

      Only one parameter is provided in this case.

    • serviceAccountId: ID of the service account used for cluster operations.

    You can request the cluster ID with the list of clusters in the folder.

  3. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
                "cluster_id": "<cluster_ID>",
                "update_mask": {
                    "paths": [
                        "service_account_id"
                    ]
                },
                "service_account_id": "<service_account_ID>"
            }' \
    mdb.api.cloud.yandex.net:443 \
    yandex.cloud.mdb.opensearch.v1.ClusterService.Update
    

    Where:

    • update_mask: List of parameters to update as an array of paths[] strings.

      Only one parameter is provided in this case.

    • service_account_id: ID of the service account used for cluster operations.

    You can request the cluster ID with the list of clusters in the folder.

  4. View the server response to make sure the request was successful.

Changing the admin passwordChanging the admin password

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, navigate to the folder page and select Managed Service for OpenSearch.
  2. Select a cluster and click Edit in the top panel.
  3. In the Admin password field, enter a new password.
  4. Click Save.

If you do not have the Yandex Cloud (CLI) command line interface yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To change the admin password for a cluster, enter a new password using one of these methods:

  • Entering a password as plain text (less secure method).

    yc managed-opensearch cluster update <cluster_name_or_ID> \
       --admin-password <new_password>
    
  • Generating a password automatically. The generated password will be output to the console.

    yc managed-opensearch cluster update <cluster_name_or_ID> \
       --generate-admin-password
    

You can request the cluster name and ID with the list of clusters in the folder.

  1. Open the current Terraform configuration file that defines your infrastructure.

    For a complete list of available Managed Service for OpenSearch cluster configuration fields, see the Terraform provider documentation.

  2. In the config section, change the admin_password field value:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
        ...
        config {
            admin_password = "<new_admin_user_password>"
        }
    }
    
  3. Make sure the settings are correct.

    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 updating the resources.

    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.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.Update method and send the following request, e.g., via cURL:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>' \
        --data '{
                    "updateMask": "configSpec.adminPassword",
                    "configSpec": {
                        "adminPassword": "<new_password>"
                    }
                }'
    

    Where:

    • updateMask: List of parameters to update as a single string, separated by commas.

      Only one parameter is provided in this case.

    • configSpec.adminPassword: New password for the admin user.

    You can request the cluster ID with the list of clusters in the folder.

  3. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
                "cluster_id": "<cluster_ID>",
                "update_mask": {
                    "paths": [
                        "config_spec.admin_password"
                    ]
                },
                "config_spec": {
                    "admin_password": "<new_password>"
                }
            }' \
    mdb.api.cloud.yandex.net:443 \
    yandex.cloud.mdb.opensearch.v1.ClusterService.Update
    

    Where:

    • update_mask: List of parameters to update as an array of paths[] strings.

      Only one parameter is provided in this case.

    • config_spec.admin_password: New password for the admin user.

    You can request the cluster ID with the list of clusters in the folder.

  4. View the server response to make sure the request was successful.

Changing OpenSearch settingsChanging OpenSearch settings

CLI
REST API
gRPC API

If you do not have the Yandex Cloud (CLI) command line interface yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

Run the following command with a list of settings to change:

yc managed-opensearch cluster update <cluster_name_or_ID> \
   --max-clause-count <number_of_Boolean_clauses> \
   --fielddata-cache-size <JVM_heap_size> \
   --reindex-remote-whitelist <host_address>:<port>

You can request the cluster name and ID with the list of clusters in the folder.

Command settings:

  • --max-clause-count: Maximum allowed number of boolean clauses per query. For more information, see the relevant OpenSearch documentation.
  • --fielddata-cache-size: JVM heap size allocated for the fielddata data structure. You can specify either an absolute value or percentage, e.g., 512mb or 50%. For more information, see the relevant OpenSearch documentation.
  • --reindex-remote-whitelist: List of remote hosts whose indexes contain documents to copy for reindexing. Specify the parameter value in <host_address>:<port> format. If you need to specify more than one host, list values separated by commas. For more information, see the relevant OpenSearch documentation.
  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.Update method and send the following request, e.g., via cURL:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>' \
        --data '{
                    "updateMask": "configSpec.opensearchSpec.opensearchConfig_2.maxClauseCount,configSpec.opensearchSpec.opensearchConfig_2.fielddataCacheSize,configSpec.opensearchSpec.opensearchConfig_2.reindexRemoteWhitelist",
                    "configSpec": {
                        "opensearchSpec": {
                            "opensearchConfig_2": {
                                "maxClauseCount": "<number_of_Boolean_clauses>",
                                "fielddataCacheSize": "<JVM_heap_size>",
                                "reindexRemoteWhitelist": "<host_address>:9200"
                            }
                        }
                    }
                }'
    

    Where:

    • updateMask: List of parameters to update as a single string, separated by commas.

    • configSpec.opensearchSpec.opensearchConfig_2: OpenSearch settings:

      • maxClauseCount: New maximum allowed number of boolean clauses. For more information, see the relevant OpenSearch documentation.

      • fielddataCacheSize: New JVM heap size allocated for the fielddata data structure. You can specify either an absolute value or percentage, e.g., 512mb or 50%. For more information, see the relevant OpenSearch documentation.

      • reindexRemoteWhitelist: New list of remote hosts whose indexes contain documents to copy for reindexing. Specify host FQDN and port 9200, separated by a colon. To specify multiple hosts, list them separated by commas after the port. For more information, see the relevant OpenSearch documentation.

    You can request the cluster ID with the list of clusters in the folder.

  3. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
                "cluster_id": "<cluster_ID>",
                "update_mask": {
                    "paths": [
                        "config_spec.opensearch_spec.opensearch_config_2.max_clause_count",
                        "config_spec.opensearch_spec.opensearch_config_2.fielddata_cache_size",
                        "config_spec.opensearch_spec.opensearch_config_2.reindex_remote_whitelist"
                    ]
                },
                "config_spec": {
                    "opensearch_spec": {
                        "opensearch_config_2": {
                            "max_clause_count": "<number_of_Boolean_clauses>",
                            "fielddata_cache_size": "<JVM_heap_size>",
                            "reindex_remote_whitelist": "<host_address>:9200"
                        }
                    }
                }
            }' \
    mdb.api.cloud.yandex.net:443 \
    yandex.cloud.mdb.opensearch.v1.ClusterService.Update
    

    Where:

    • update_mask: List of parameters to update as an array of paths[] strings.

      Only one parameter is provided in this case.

    • config_spec.opensearch_spec.opensearch_config_2: OpenSearch settings:

      • max_clause_count: New maximum allowed number of boolean clauses. For more information, see the relevant OpenSearch documentation.

      • fielddata_cache_size: New JVM heap size allocated for the fielddata data structure. You can specify either an absolute value or percentage, e.g., 512mb or 50%. For more information, see the relevant OpenSearch documentation.

      • reindex_remote_whitelist: New list of remote hosts whose indexes contain documents to copy for reindexing. Specify host FQDN and port 9200, separated by a colon. To specify multiple hosts, list them separated by commas after the port. For more information, see the relevant OpenSearch documentation.

    You can request the cluster ID with the list of clusters in the folder.

  4. View the server response to make sure the request was successful.

Changing additional cluster settingsChanging additional cluster settings

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, navigate to the folder page and select Managed Service for OpenSearch.

  2. Select a cluster and click Edit in the top panel.

  3. Change additional cluster settings:

    • Maintenance window: Maintenance window settings:

      • To enable maintenance at any time, select arbitrary (default).
      • To specify the preferred maintenance start time, select by schedule and specify the desired day of the week and UTC hour. For example, you can choose a time when the cluster is least loaded.

      Maintenance operations are carried out both on enabled and disabled clusters. They may include updating the DBMS, applying patches, and so on.

    • Deletion protection: Manages cluster protection against accidental deletion.

      Even with cluster deletion protection enabled, one can still delete a user or connect to the cluster manually and delete the data.

  4. Click Save.

If you do not have the Yandex Cloud (CLI) command line interface yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

Run the following command with a list of settings to change:

yc managed-opensearch cluster update <cluster_name_or_ID> \
   --maintenance schedule=<maintenance_type>,`
                `weekday=<day_of_week>,`
                `hour=<hour> \
   --delete-protection \
   --data-transfer-access=<true_or_false> \
   --serverless-access=<true_or_false>

You can request the cluster name and ID with the list of clusters in the folder.

Command settings:

  • --maintenance: Maintenance window settings (including for disabled clusters):

    • To allow maintenance at any time, specify --maintenance schedule=anytime.

    • To specify the preferred maintenance start time, specify --maintenance schedule=weekly,weekday=<day_of_week>,hour=<hour_in_UTC>. In this case, maintenance will take place every week on a specified day at a specified time.

      Possible weekday values: mon, tue, wed, thu, fry, sat, sun. In the hour parameter, specify the maintenance completion time. For example, if you set 14, maintenance will take place from 13:00 until 14:00 UTC.

  • --deletion-protection: Cluster protection from accidental deletion, true or false.

    Even with cluster deletion protection enabled, one can still delete a user or connect to the cluster manually and delete the data.

  • --serverless-access: Access from Yandex Serverless Containers, true or false.

  1. Open the current Terraform configuration file that defines your infrastructure.

    For a complete list of available Managed Service for OpenSearch cluster configuration fields, see the Terraform provider documentation.

  2. To change the maintenance time (including for disabled clusters), specify the following settings in the maintenance_window parameter:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
        ...
        maintenance_window {
            type = "<maintenance_frequency>"
            hour = <hour>
            day = "<day_of_week>"
        }
    }
    

    Specify the following in the parameters:

    • type: ANYTIME to allow maintenance at any time or WEEKLY to perform maintenance every week.
    • hour: Maintenance completion hour, UTC. For example, if you set 14, maintenance will take place from 13:00 until 14:00 UTC.
    • day: Day of week for maintenance. Possible values: MON, TUE, WED, THU, FRI, SAT, SUN.
  3. To enable cluster protection against accidental deletion by a user of your cloud, add the deletion_protection field set to true to your cluster description:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
        ...
        deletion_protection = <true_or_false>
    }
    

    Where deletion_protection is the protection against accidental cluster deletion.

    Even with cluster deletion protection enabled, one can still delete a user or connect to the cluster manually and delete the data.

  4. Make sure the settings are correct.

    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.

  5. Confirm updating the resources.

    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.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.Update method and send the following request, e.g., via cURL:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>' \
        --data '{
                    "updateMask": "configSpec.access,deletionProtection,maintenanceWindow",
                    "configSpec": {
                        "access": {
                            "dataTransfer": <access_from_Data_Transfer:_true_or_false>,
                            "serverless": <access_from_Serverless_Containers:_true_or_false>
                        }
                    },
                    "deletionProtection": <cluster_deletion_protection:_true_or_false>,
                    "maintenanceWindow": {
                        "weeklyMaintenanceWindow": {
                            "day": "<day_of_week>",
                            "hour": "<hour>"
                        }
                    }
                }'
    

    Where:

    • updateMask: List of parameters to update as a single string, separated by commas.

    • access: Cluster settings for access to the following Yandex Cloud services:

      • dataTransfer: Yandex Data Transfer
      • serverless: Yandex Serverless Containers
    • deletionProtection: Cluster protection from accidental deletion.

      Even with cluster deletion protection enabled, one can still delete a user or connect to the cluster manually and delete the data.

    • maintenanceWindow.weeklyMaintenanceWindow: Maintenance window schedule:

      • day: Day of week, in DDD format, for scheduled maintenance.
      • hour: Hour, in HH format, for scheduled maintenance. The possible values range from 1 to 24. Use the UTC time zone.

    You can request the cluster ID with the list of clusters in the folder.

  3. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
                "cluster_id": "<cluster_ID>",
                "update_mask": {
                    "paths": [
                        "config_spec.access",
                        "deletion_protection",
                        "maintenance_window"
                    ]
                },
                "config_spec": {
                    "access": {
                        "data_transfer": <access_from_Data_Transfer:_true_or_false>,
                        "serverless": <access_from_Serverless_Containers:_true_or_false>
                    }
                },
                "deletion_protection": <cluster_deletion_protection:_true_or_false>,
                "maintenance_window": {
                    "weekly_maintenance_window": {
                        "day": "<day_of_week>",
                        "hour": "<hour>"
                    }
                }
            }' \
    mdb.api.cloud.yandex.net:443 \
    yandex.cloud.mdb.opensearch.v1.ClusterService.Update
    

    Where:

    • update_mask: List of parameters to update as an array of paths[] strings.

      Only one parameter is provided in this case.

    • access: Cluster settings for access to the following Yandex Cloud services:

      • data_transfer: Yandex Data Transfer
      • serverless: Yandex Serverless Containers
    • deletion_protection: Cluster protection from accidental deletion.

      Even with cluster deletion protection enabled, one can still delete a user or connect to the cluster manually and delete the data.

    • maintenance_window.weekly_maintenance_window: Maintenance window schedule:

      • day: Day of week, in DDD format, for scheduled maintenance.
      • hour: Hour, in HH format, for scheduled maintenance. The possible values range from 1 to 24. Use the UTC time zone.

    You can request the cluster ID with the list of clusters in the folder.

  4. View the server response to make sure the request was successful.

Changing security groupsChanging security groups

After you assign other security groups, you may need to additionally set them up to connect to the cluster.

Management console
CLI
Terraform
REST API
gRPC API
  1. In the management console, navigate to the folder page and select Managed Service for OpenSearch.
  2. Select a cluster and click Edit in the top panel.
  3. Under Network settings, select security groups for cluster network traffic.
  4. Click Save.

If you do not have the Yandex Cloud (CLI) command line interface yet, install and initialize it.

The folder specified when creating the CLI profile is used by default. To change the default folder, use the yc config set folder-id <folder_ID> command. You can specify a different folder using the --folder-name or --folder-id parameter.

To edit the list of security groups for a cluster, specify the security groups you need in the command:

yc managed-opensearch cluster update <cluster_name_or_ID> \
   --security-group-ids <list_of_security_group_IDs>

If you need to specify more than one group, list them separated by commas.

You can request the cluster name and ID with the list of clusters in the folder.

  1. Open the current Terraform configuration file that defines your infrastructure.

    For a complete list of available Managed Service for OpenSearch cluster configuration fields, see the Terraform provider documentation.

  2. In the security_group_ids field, list the security group IDs separated by commas:

    resource "yandex_mdb_opensearch_cluster" "<cluster_name>" {
        ...
        security_group_ids = [ "<security_groups>" ]
    }
    
  3. Make sure the settings are correct.

    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 updating the resources.

    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.

  1. Get an IAM token for API authentication and put it into the environment variable:

    export IAM_TOKEN="<IAM_token>"
    
  2. Use the Cluster.Update method and send the following request, e.g., via cURL:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask parameter as a single comma-separated string.

    curl \
        --request PATCH \
        --header "Authorization: Bearer $IAM_TOKEN" \
        --header "Content-Type: application/json" \
        --url 'https://mdb.api.cloud.yandex.net/managed-opensearch/v1/clusters/<cluster_ID>' \
        --data '{
                    "updateMask": "securityGroupIds",
                    "securityGroupIds": [
                        "<security_group_1_ID>",
                        "<security_group_2_ID>",
                        ...
                        "<security_group_N_ID>"
                    ]
                }'
    

    Where:

    • updateMask: List of parameters to update as a single string, separated by commas.

      Only one parameter is provided in this case.

    • securityGroupIds: Security group IDs.

    You can request the cluster ID with the list of clusters in the folder.

  3. View the server response to make sure the request was successful.

  1. Get an IAM token for API authentication and put it into the 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 the repository contents are stored in the ~/cloudapi/ directory.

  3. Use the ClusterService.Update call and send the following request, e.g., via gRPCurl:

    Warning

    The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the update_mask parameter as an array of paths[] strings.

    Format for listing settings
    "update_mask": {
        "paths": [
            "<setting_1>",
            "<setting_2>",
            ...
            "<setting_N>"
        ]
    }
    
    grpcurl \
        -format json \
        -import-path ~/cloudapi/ \
        -import-path ~/cloudapi/third_party/googleapis/ \
        -proto ~/cloudapi/yandex/cloud/mdb/opensearch/v1/cluster_service.proto \
        -rpc-header "Authorization: Bearer $IAM_TOKEN" \
        -d '{
                "cluster_id": "<cluster_ID>",
                "update_mask": {
                    "paths": [
                        "security_group_ids"
                    ]
                },
                "security_group_ids": [
                    "<security_group_1_ID>",
                    "<security_group_2_ID>",
                    ...
                    "<security_group_N_ID>"
                ]
            }' \
    mdb.api.cloud.yandex.net:443 \
    yandex.cloud.mdb.opensearch.v1.ClusterService.Update
    

    Where:

    • update_mask: List of parameters to update as an array of paths[] strings.

      Only one parameter is provided in this case.

    • security_group_ids: Security group IDs.

    You can request the cluster ID with the list of clusters in the folder.

  4. View the server response to make sure the request was successful.

Was the article helpful?

Previous
Configuring SAML authentication
Next
OpenSearch version upgrade
Yandex project
© 2025 Yandex.Cloud LLC