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.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Constraints
- The following DB engines are supported: MySQL, PostgreSQL, and Microsoft SQL Server.
- The new parameter template cannot have the same name as any existing parameter template.
URI
- URI format
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Definition Specifies the parameter template name. Constraints It contains a maximum of 64 characters and can contain only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and periods (.). Range N/A Default Value N/A |
datastore |
Yes |
Object |
Definition Specifies the database object. For details, see Table 3. Constraints N/A |
description |
No |
String |
Definition Specifies the parameter template description. Constraints It contains a maximum of 256 characters and cannot contain the following special characters: >!<"&'= Its value is left blank by default. Range N/A Default Value N/A |
values |
No |
Map<String,String> |
Definition Specifies the parameter values defined by users based on the default parameter templates. Constraints N/A Range
Default Value By default, the parameter values are not changed. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Definition DB engine. Constraints The value is case-insensitive. Range
Default Value N/A |
version |
Yes |
String |
Definition DB engine version. Constraints For details, see Constraints.
Range
Default Value N/A |
Example Request
Create a parameter template named configuration_test.
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/configurations { "name": "configuration_test", "description": "configuration_test", "values": { "div_precision_increment": "6", "connect_timeout": "20" }, "datastore": { "type": "mysql", "version": "5.7" } }
Response
- Normal response
Table 4 Parameters Parameter
Type
Description
configuration
Object
Definition
Indicates the parameter template information.
For details, see Table 5.
Table 5 configuration field data structure description Parameter
Type
Description
id
String
Definition
Indicates the parameter template ID.
Range
N/A
name
String
Definition
Indicates the parameter template name.
Range
N/A
datastore_version_name
String
Definition
Indicates the database version name.
Range
N/A
datastore_name
String
Definition
Indicates the database name.
Range
N/A
description
String
Definition
Indicates the parameter template description.
Range
N/A
created
String
Definition
Indicates the creation time.
Range
The value is in the yyyy-MM-ddTHH:mm:ssZ format. 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
Definition
Indicates the update time.
Range
The value is in the yyyy-MM-ddTHH:mm:ssZ format. 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.
- Example normal response
{ "configuration": { "id": "463b4b58-d0e8-4e2b-9560-5dea4552fde9", "name": "configuration_test", "datastore_version_name": "5.7", "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
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot