Creating a Parameter Template

Function

This API is used to create a parameter template and configure the name, description, DB engine, and parameter values in the parameter template.

Constraints

The name of the created parameter template cannot be the same as that of the default or an existing parameter template.

  • When you create a PostgreSQL parameter template, the following specification parameters do not take effect and are invisible to you after the parameter template is created. Applying a created parameter template to a DB instance will not change the original values of the following specification parameters for the DB instance. To change such parameter values, you can log in to the RDS console, click the DB instance name, and choose Parameters from the navigation pane.

    • shared_buffers

    • max_connections

    • max_prepared_transactions

    • effective_cache_size

    • maintenance_work_mem

    • max_wal_size

    • work_mem

URI

  • URI format

    POST https://{Endpoint}/v3/{project_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.

Request

  • Parameter description

    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    name

    Yes

    String

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

    description

    No

    String

    Specifies the parameter template description. It contains a maximum of 256 characters and cannot contain the following special characters: >!<"&'= Its value is left blank by default.

    values

    No

    Object

    Specifies the parameter values defined by users based on the default parameter template. By default, the parameter values cannot be changed.

    For details, see Table 3.

    datastore

    Yes

    Object

    Specifies the database object.

    For details, see Table 4.

    Table 3 values field data structure description

    Name

    Mandatory

    Type

    Description

    key

    No

    String

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

    value

    No

    String

    Specifies the parameter value. For example, in "max_connections": "10", the value is 10.

    Table 4 datastore field data structure description

    Name

    Mandatory

    Type

    Description

    type

    Yes

    String

    Specifies the DB engine. Its value can be any of the following and is case-insensitive:

    • MySQL

    • PostgreSQL

    • SQLServer

    version

    Yes

    String

    Specifies the database version.

    Example values:

    • MySQL: 8.0

    • PostgreSQL: 14

    • SQLServer: 2019_SE

  • Example

    POST https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/configurations

  • Request example

    {
        "name": "configuration_test",
        "description": "configuration_test",
        "values": {
            "max_connections": "10",
            "autocommit": "OFF"
        },
        "datastore": {
            "type": "mysql",
            "version": "8.0"
        }
    }
    

Response

  • Normal response

    Table 5 Parameter description

    Name

    Type

    Description

    configuration

    Object

    Indicates the parameter template information.

    For details, see Table 6.

    Table 6 configuration field data structure 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.

    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.

  • Example normal response

    {
        "configuration": {
            "id": "463b4b58-d0e8-4e2b-9560-5dea4552fde9",
            "name": "configuration_test",
            "datastore_version_name": "5.6",
            "datastore_name": "mysql",
            "description": "configuration_test",
            "created": "2017-04-09T08:27:56+0800",
            "updated": "2017-04-09T08:27:56+0800"
        }
    }
    
  • Abnormal Response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.