• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. OpenStack trove API v1.0
  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: /{versionId}/{project_id}/configurations

    Method: POST

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    versionId

    Yes

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

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

  • Restrictions
    • The name of the created parameter group is case-insensitive and must be different from the name of an existing or a default parameter group.
    • Currently, the DB engines MySQL and PostgreSQL support creating parameter groups.
    • The values of the created parameter group 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

    configuration

    Yes

    Dictionary data structure. For details, see Table 3.

    Specifies the parameter group.

    Table 3 configuration field data structure 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 does not support the following special characters: !<>='&"

    values

    Yes

    Dictionary data structure. For details, see Table 4.

    Specifies the parameter group value defined by users based on the default parameter groups.

    datastore

    Yes

    Dictionary data structure. For details, see Table 5.

    Specifies the database object.

    Table 4 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.

    value

    No

    String

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

    Table 5 datastore field data structure description

    Name

    Mandatory

    Type

    Description

    type

    Yes

    String

    Specifies the DB engine. Currently, MySQL and PostgreSQL are supported. The value is case-insensitive and can be mysql or postgresql.

    version

    Yes

    String

    Specifies the database version.

    • For MySQL, the value can be 5.6 and 5.7. The value 5.6 is supported by default.
    • For PostgreSQL, the value can be 9.5 and 9.6. The value 9.5 is supported by default.
  • Request example
    {
      "configuration": {
        "name": "configuration_test",
        "description": "configuration_test",
        "values": {
           "max_connections": "10",
           "autocommit": "OFF"
        },
        "datastore": {
          "type": "mysql",
          "version": "5.6"
        }
      }
    }

Normal Response

  • Parameter description
    Table 6 Parameter description

    Name

    Type

    Description

    configuration

    Dictionary data structure. For details, see Table 7.

    Indicates the parameter group.

    Table 7 configuration field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the parameter group ID.

    name

    String

    Indicates the parameter group name.

    datastore_version_id

    String

    Indicates the database version ID.

    datastore_version_name

    String

    Indicates the database version name.

    datastore_name

    String

    Indicates the database name.

    description

    String

    Indicates the parameter group description.

    instance_count

    Int

    Indicates the number of DB instances to which the parameter group applies.

    created

    String

    Indicates the parameter group creation time in the following format: yyyy-MM-ddTHH:mm:ss.

    updated

    String

    Indicates the parameter group updated time in the following format: yyyy-MM-ddTHH:mm:ss.

    values

    Dictionary data structure. For details, see Table 8.

    Indicates the parameter group value defined by users based on the default parameter groups.

    Table 8 values field data structure description

    Name

    Type

    Description

    key

    String

    Indicates the parameter name. For example, in "max_connections": "10", the key is max_connections.

    value

    String

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

  • Response example
    {
      "configuration": {
        "id": "463b4b58-d0e8-4e2b-9560-5dea4552fde9",
        "name": "configuration_test",
        "datastore_version_id": "de90043f-7f29-4a3e-ba82-f8beb5678b46",
        "datastore_version_name": "5.6",
        "datastore_name": "mysql",
        "description": "configuration_test",
        "instance_count": 0,
        "created": "2017-04-09T08:27:56",
        "updated": "2017-04-09T08:27:56",
        "values": {
           "max_connections": "10",
           "autocommit": "OFF"
        }
      }
    }

Abnormal Response

For details, see Abnormal Request Results.