Updated on 2026-01-08 GMT+08:00

Modifying Parameters of a Specified DB Instance

Description

This API is used to modify the parameters of a specified DB instance. The parameters can be the parameter template of a DB instance, group, or node.

URI

  • URI format

    PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/configurations

Table 1 Path parameters

Name

Type

IN

Mandatory

Description

project_id

string

path

Yes

Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

instance_id

string

path

Yes

Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

Request Parameters

Table 2 Request header parameters

Parameter

Type

IN

Mandatory

Description

X-Auth-Token

string

header

Yes

User token

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

entity_id

Yes

String

Instance ID, group ID, or node ID. You can call the API used for querying instances and details to obtain the value. If you do not have an instance, you can call the API used for creating an instance.

  • If the DB instance type is cluster and the shard or config parameter template is to be changed, the value is the group ID. If the parameter template of the mongos node is to be changed, the value is the node ID.
  • If the DB instance type is replica set, the value is the instance ID. If the parameter template of a read replica is to be changed, the value is the read replica ID.

parameter_values

Yes

Map<String,String>

Mapping between parameter names and parameter values. You can customize parameter values based on the parameters in the default parameter template.

  • Request example
    { 
      "entity_id" : "73ea2bf70c73497f89ee0ad4ee008aa2no02", 
      "parameter_values" : { 
        "max_connections" : "10" 
      } 
    }

Response Parameters

  • Parameter description
    Table 4 Response body parameters

    Parameter

    Type

    Description

    job_id

    String

    The ID of the asynchronous task for modifying instance parameters.

    restart_required

    Boolean

    Check whether the instance, group, or node needs to be restarted after parameter modification.

    • If the value is false, the instance does not need to be restarted.
    • If the value is true, the instance needs to be restarted.
  • Example response
    {
    	"job_id" : "bf26cf3c-d046-4080-bb45-f114be7afa5f",
    	"result_required" : false
    }

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.