Help Center> Relational Database Service> API Reference> API v3 (Recommended)> Parameter Management> Obtaining Parameters in a Specified Parameter Template
Updated on 2024-02-06 GMT+08:00

Obtaining Parameters in a Specified Parameter Template

Function

This API is used to obtain parameters of a specified parameter template.

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

URI

  • URI format

    GET /v3/{project_id}/configurations/{config_id}

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

    config_id

    Yes

    Specifies the parameter template ID.

    When this parameter is empty (not space), the URL of the parameter template list is obtained. For details, see Obtaining a Parameter Template List.

Request

  • Request parameters

    None

  • URI example

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

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    id

    String

    Indicates the parameter template ID.

    name

    String

    Indicates the parameter template name.

    datastore_version_name

    String

    Indicates the database version name.

    datastore_name

    String

    Indicates the database name.

    description

    String

    Indicates the parameter template description.

    created

    String

    Indicates the creation time in the following format: yyyy-MM-ddTHH:mm:ssZ.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

    updated

    String

    Indicates the update time in the following format: yyyy-MM-ddTHH:mm:ssZ.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

    configuration_parameters

    Array of objects

    Indicates the parameters defined by users based on the default parameter templates.

    For details, see Table 3.

    Table 3 configuration_parameters field data structure description

    Name

    Type

    Description

    name

    String

    Indicates the parameter name.

    value

    String

    Indicates the parameter value.

    restart_required

    Boolean

    Indicates whether a restart is required.

    • false: indicates that a restart is not required.
    • true: indicates that a restart is required.

    readonly

    Boolean

    Indicates whether the parameter is read-only.

    • false: indicates that the parameter is not read-only.
    • true: indicates that the parameter is read-only.

    value_range

    String

    Indicates the parameter value range. If the type is integer, the value is 0 or 1. If the type is boolean, the value is true or false.

    type

    String

    Indicates the parameter type, which can be integer, string, boolean, list, or float.

    description

    String

    Indicates the parameter description.

  • Example normal response
    { 
        "id": "07fc12a8e0e94df7a3fcf53d0b5e1605pr01", 
        "name": "default-mysql-5.7", 
        "datastore_version_name": "5.7", 
        "datastore_name": "mysql", 
        "description": "Default parameter group for mysql 5.7", 
        "created": "2017-05-05T04:40:51+0800", 
        "updated": "2017-05-05T04:40:51+0800", 
        "configuration_parameters": [ 
          { 
            "name": "auto_increment_increment", 
            "value": "1", 
            "restart_required": false, 
            "readonly": true, 
            "value_range": "1-65535", 
            "type": "integer", 
            "description": "auto_increment_increment and auto_increment_offset are intended for use with master-to-master replication, and can be used to control the operation of AUTO_INCREMENT columns." 
          }, 
          { 
            "name": "autocommit", 
            "value": "ON", 
            "restart_required": false, 
            "readonly": true, 
            "value_range": "ON|OFF", 
            "type": "boolean", 
            "description": "The autocommit mode. If set to ON, all changes to a table take effect immediately. If set to OFF, you must use COMMIT to accept a transaction or ROLLBACK to cancel it. " 
          } 
        ] 
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.