Creating a Parameter Template
Description
This API is used to create a parameter template and configure the name, description, DB engine, and parameter values in the parameter template.
Restrictions
- This API applies only to DDS Community Edition.
- The name of the custom parameter template is case-sensitive and must be different from the name of an existing or a default parameter template.
- The value of parameter_values in the parameter template must be within the default value range of the specified database version. For details about the range of parameter values, see Editing a Parameter Template in Document Database Service User Guide.
|
Name |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
project_id |
string |
path |
Yes |
Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID. |
Request Parameters
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Auth-Token |
string |
header |
Yes |
User token |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
name |
String |
Yes |
Parameter template name. Value range: a string of 1 to 64 characters, which can contain only letters, digits, hyphens (-), underscores (_), and periods (.). |
|
description |
String |
Yes |
Parameter template description. This parameter is left blank by default. The description must consist of a maximum of 256 characters and cannot contain the carriage return character or the following special characters: >!<"&'= |
|
parameter_values |
Map<String,String> |
Yes |
Mapping between parameter names and parameter values. You can customize parameter values based on the parameters in the default parameter template. |
|
datastore |
Object |
Yes |
Database object. For details, see Table 4. |
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
node_type |
String |
Yes |
Node type of parameter template. Valid value:
|
|
version |
String |
Yes |
Database version. Versions 4.4, 4.2, 4.0, and 3.4 are supported. The value can be 4.4, 4.2, 4.0, or 3.4. |
- Request example
{ "name" : "myparameter", "description" : "parameter1", "datastore" : { "node_type" : "shard", "version" : "3.4" }, "parameter_values" : { "max_connections" : "10" } }
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Parameter template ID |
|
name |
String |
Parameter template name |
|
description |
String |
Parameter template description. |
|
datastore_version |
String |
Database version. |
|
datastore_name |
String |
Database type. |
|
created |
String |
Creation time 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. |
|
updated |
String |
Update time 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. |
- Example response
{ "configuration": { "id": "7b4e07852bd54016906e89461b3182cdpr02", "name": "myparameter", "description": "parameter1", "datastore_version": "3.4", "datastore_name": "mongodb", "created": "2018-09-19T02:54:21", "updated": "2018-09-19T02:54:21" } }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
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