Help Center/ Relational Database Service/ API Reference/ Historical APIs/ API v3/ Modifying Parameters of a Specified DB Instance
Updated on 2024-04-01 GMT+08:00

Modifying Parameters of a Specified DB Instance

Function

This API is used to modify parameters in the parameter template of a specified DB instance.

This API will be unavailable on March 31, 2025. You are advised to switch workloads to the new API (Modifying Parameters of a Specified Instance) before then.

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

Constraints

  • The following DB engines are supported: MySQL, PostgreSQL, and Microsoft SQL Server.
  • The new parameter values must be within the default ranges for specified DB engine versions. For details, see "Modifying Instance Parameters" in the Relational Database Service User Guide.
  • Modifying sensitive parameters, for example, lower_case_table_names, is risky. For details, see "Suggestions on RDS for MySQL Parameter Tuning" in the Relational Database Service User Guide.

URI

  • URI format

    PUT /v3/{project_id}/instances/{instance_id}/configurations

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the 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

    Specifies the DB instance ID.

Request

Parameter description
Table 2 Parameter description

Name

Mandatory

Type

Description

values

Yes

Map<String,String>

Specifies the parameter values defined by users based on the default parameter templates.

  • key: parameter name, for example, div_precision_increment or connect_timeout. If this parameter is not specified, no parameter value is to be changed.
  • value: parameter value, for example, 6 or 20. If key is not empty, the parameter value cannot be empty, either.

Request example

  • RDS for MySQL
    https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/configurations
    
    {
      "values" : { 
        "max_connections" : "10", 
        "autocommit" : "OFF",
        "binlog_checksum" : "CRC32",
        "innodb_purge_threads" : "4"
      } 
    }
  • RDS for PostgreSQL
    {
      "values" : { 
        "max_connections" : "10", 
        "autovacuum" : "on",
        "bytea_output" : "escape",
        "client_encoding" : "UTF8",
        "cpu_tuple_cost" : "0.01"
      } 
    }

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    job_id

    String

    Task ID.

    restart_required

    Boolean

    Indicates whether a reboot is required.

    • true: A reboot is required.
    • false: A reboot is not required.

    ignored_params

    List

    All parameters that are ignored and fail to be modified in the request parameter values.

    If a parameter does not exist, the modification will fail. The names of all ignored parameters are returned by ignored_params.

  • 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.