• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. API v3 (Recommended)
  5. Parameter Configuration
  6. Creating a Parameter Group

Creating a Parameter Group

Function

This API is used to create a parameter group.

URI

  • URI format

    PATH: /{version_id}/{project_id}/configurations

    Method: POST

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    version_id

    Yes

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

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

  • Restrictions
    • Currently, RDS supports the following DB engines and versions:
      • MySQL 5.6 and 5.7
      • PostgreSQL 9.5 and 9.6
      • Microsoft SQL Server 2014 SE, 2016 SE, and 2016 EE
    • The name of the created parameter group must be different from the name of an existing or a default parameter group.
    • 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 section "Editing Parameters in a Parameter Group" in the Relational Database Service User Guide.

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    name

    Yes

    String

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

    values

    No

    Dictionary data structure

    Indicates the parameter group value defined by users based on the default parameter groups. By default, the parameter value cannot be changed.

    For details, see Table 3.

    datastore

    Yes

    Dictionary data structure

    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. Currently, MySQL, PostgreSQL, and Microsoft SQL Server are supported. The value is case-insensitive and can be mysql, postgresql, or sqlserver.

    version

    Yes

    String

    Specifies the database version.
    • MySQL databases support MySQL 5.6 and 5.7. Example value: 5.7
    • PostgreSQL databases support PostgreSQL 9.5 and 9.6. Example value: 9.5
    • Microsoft SQL Server databases support 2014 SE, 2016 SE, and 2016 EE. Example value: 2014_SE
  • Request example
    {
    	"name": "configuration_test",
    	"description": "configuration_test",
    	"values": {
    		"max_connections": "10",
    		"autocommit": "OFF"
    	},
    	"datastore": {
    		"type": "mysql",
    		"version": "5.6"
    	}
    }

Normal Response

  • Parameter description
    Table 5 Parameter description

    Name

    Type

    Description

    configuration

    Dictionary data structure

    Indicates the parameter group.

    For details, see Table 6.

    Table 6 configuration field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the parameter group ID.

    name

    String

    Indicates the parameter group name.

    datastore_version_name

    String

    Indicates the database version name.

    datastore_name

    String

    Indicates the database name.

    description

    String

    Indicates the parameter group 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.

  • Response example
{
	"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.