Updated on 2024-04-13 GMT+08:00

Modifying Parameters of a Specified Instance

Function

This API is used to modify parameters of a specified instance.

  • Before calling an API, you need to understand the API in Authentication.

Constraints

  • The following DB engines are supported: MySQL and PostgreSQL.
  • The values of the edited parameters must be within the default value range of the specified database version. For details about the range of parameter values, see "Modifying Parameters" in the Relational Database Service User Guide.

URI

  • URI format

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

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    Instance ID.

Request

  • Request parameters
    Table 2 Request body parameter description

    Name

    Mandatory

    Type

    Description

    values

    Yes

    Map<String,String>

    Parameter values defined by users based on the default parameter template.

    • key: parameter name. For example, in "max_connections": "10", the key is max_connections. If key is left blank, the parameter value is not changed. If key is not empty, the parameter value cannot be empty, either.
    • value: parameter value. For example, in "max_connections": "10", the value is 10.
  • Example

    PUT https://{Endpoint}/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/configurations

  • Request example
    {
      "values" : { 
        "max_connections" : "10", 
        "autocommit" : "OFF" 
      } 
    }

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    job_id

    String

    Job ID.

    restart_required

    Boolean

    Whether a reboot is required.

    • true: A reboot is required.
    • false: A reboot is not required.
  • Example normal response
    { 
      "job_id" : "e7a7535b-eb9b-45ac-a83a-020dc5016d94",
      "restart_required" : false,
      "ignored_params": []
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.