Updated on 2022-12-12 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

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/375d8d8fad1f43039e23d3b6c0f60a19/instances/9136fd2a9fcd405ea4674276ce36dae8in02/configurations

Table 1 Request parameters

Name

Type

IN

Mandatory

Description

x-auth-token

string

header

Yes

User token

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.

Requests

  • Parameter description
    Table 2 Request body parameters

    Name

    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 changed, the value is the node ID.
    • If the DB instance to be changed is a replica set instance or a single node instance, the value is the instance 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" 
      } 
    }

Responses

  • Parameter description
    Table 3 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.
  • Response example
    {
    	"job_id" : "bf26cf3c-d046-4080-bb45-f114be7afa5f",
    	"result_required" : false
    }

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.