Updated on 2025-08-20 GMT+08:00

Modifying a Parameter Template

Function

This API is used to modify a specified parameter template, including the name, description, and values of specified parameters in the parameter template.

Constraints

  • The following DB engines are supported: MySQL, PostgreSQL, and Microsoft SQL Server.
  • The new parameter template name must be different from the name of an existing or a default parameter template. Default parameter templates cannot be modified.
  • 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.
  • 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.
  • The parameter values to be changed cannot be left blank at the same time.

URI

  • URI format

    PUT /v3/{project_id}/configurations/{config_id}

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    config_id

    Yes

    Definition

    Specifies the parameter template ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request

At least one parameter in the request body must be specified. Otherwise, the request fails to be delivered.

Table 2 Parameters

Parameter

Mandatory

Type

Description

name

No

String

Definition

Specifies the parameter template name.

Constraints

It contains a maximum of 64 characters and can contain only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and periods (.).

Range

N/A

Default Value

N/A

description

No

String

Definition

Specifies the parameter template description.

Constraints

It contains a maximum of 256 characters and does not support the following special characters: !<>='&" Its value is left blank by default.

Range

N/A

Default Value

N/A

values

No

Map<String,String>

Definition

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

Constraints

N/A

Range

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

Default Value

If this parameter is not specified, no parameter value is to be changed.

Example Request

Modify parameters in a parameter template.

PUT https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/configurations/463b4b58-d0e8-4e2b-9560-5dea4552fde9

{ 
    "name": "configuration_test", 
    "description": "configuration_test", 
    "values": { 
       "div_precision_increment": "6",
       "connect_timeout": "20"
    } 
}

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    configuration

    Object

    Definition

    Parameter template information. For details, see Table 4.

    Table 4 configuration field data structure description

    Parameter

    Type

    Description

    id

    String

    Definition

    Parameter template ID.

    Range

    N/A

    name

    String

    Definition

    Parameter template name.

    Range

    N/A

    ignored_params

    List

    Definition

    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.

    Range

    N/A

  • Example normal response
    {
        "configuration": {
            "id": "463b4b58-d0e8-4e2b-9560-5dea4552fde9",
            "name": "configuration_test",
            "ignored_params": {}
        }
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.