This API is used to create a parameter template and configure the name, description, DB engine, and parameter values in the parameter template.
PATH: /v1.0/{project_id}/configurations
Method: POST
Name |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID of a tenant in a region. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
configuration |
Yes |
Dictionary data structure. For details, see Table 3. |
Specifies the parameter template object. |
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 does not support the following special characters: !<>='&" |
values |
Yes |
Dictionary data structure. For details, see Table 4. |
Specifies the parameter values defined by users based on the default parameter template. |
datastore |
Yes |
Dictionary data structure. For details, see Table 5. |
Specifies the database object. |
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. |
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.
|
{ "configuration": { "name": "configuration_test", "description": "configuration_test", "values": { "max_connections": "10", "autocommit": "OFF" }, "datastore": { "type": "mysql", "version": "5.6" } } }
Name |
Type |
Description |
---|---|---|
configuration |
Dictionary data structure. For details, see Table 7. |
Indicates the parameter template information. |
Name |
Type |
Description |
---|---|---|
id |
String |
Indicates the parameter template ID. |
name |
String |
Indicates the parameter template 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 template description. |
instance_count |
Int |
Indicates the number of DB instances to which the parameter template applies. |
created |
String |
Indicates the parameter template creation time in the following format: yyyy-MM-ddTHH:mm:ss. |
updated |
String |
Indicates the parameter template updated time in the following format: yyyy-MM-ddTHH:mm:ss. |
values |
Dictionary data structure. For details, see Table 8. |
Indicates the parameter values defined by users based on the default parameter template. It is displayed only when you specify a custom parameter group. If you use a default parameter group, it is not returned. |
{ "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" } } }
For details, see Abnormal Request Results.