• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. API v1
  5. Parameter Configuration
  6. Setting Configuration Parameters

Setting Configuration Parameters

Function

This API is used to set DB instance parameters.

NOTE:

A parameter group (with same name as the DB instance) will be created if needed.

URI

  • URI format

    PATH: /rds/{versionId}/{project_id}/instances/{instanceId}/parameters

    Method: PUT

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    versionId

    Yes

    Specifies the API version. It is case-sensitive and the value is v1.

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    instanceId

    Yes

    Specifies the ID of the queried DB instance.

  • Restrictions
    • For details about the range of parameter values, see the "Modifying Parameters in a Parameter Group" section in the Relational Database Service User Guide.
    • If a parameter of the primary DB instance is modified, the corresponding parameter of the standby DB instance is modified simultaneously. You cannot modify the parameters of the standby DB instance. You can modify the parameters of read replicas.

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    values

    Dictionary data structure

    Specifies the parameter value list.

    key specifies the parameter name. value specifies the parameter value.

  • Request example
    {
        "values": {
             "connect_timeout": 17,
             "sync_binlog": 1
        }
    }

Normal Response

  • Parameter description
    Table 3 Parameter description

    Name

    Type

    Description

    shouldRestart

    String

    Indicates whether the parameter needs to be restarted for the modifications to take effect.

    • The value 1 indicates that the parameter needs to be restarted for the modifications to take effect.
    • The value 0 indicates that the parameter does not need to be restarted for the modifications to take effect

    setParameteResult

    String

    Indicates the parameter modification result.

    • The value 1 indicates that the modifications are successful on the primary DB instance but failed on the standby DB instance.
    • 0 indicates that the modifications are successful on every DB instance.
  • Response example
    { 
         "shouldRestart": "0",
         "setParameteResult": "0" 
    }

Abnormal Response

For details, see Abnormal Request Results.