Creating a Parameter Template
Function
This API is used to create a parameter template and configure the name, description, DB engine version, and parameter values in the parameter template.
Constraints
This API supports the following instance types:
- GeminiDB Cassandra
- GeminiDB Mongo
- GeminiDB Influx instances with classic storage
- GeminiDB Redis instances with classic storage
The new parameter template cannot have the same name as any existing parameter template.
For configuration item values, you can enter system-defined parameters that allow for modification.
URI
POST https://{Endpoint}/v3/{project_id}/configurations
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints: N/A Values: N/A Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Explanation: User token. You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication. Constraints: N/A Values: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Explanation: Parameter template name Constraints: The name can contain a maximum of 64 characters and can contain only uppercase letters, lowercase letters, digits, hyphens (-), underscores (_), and periods (.). Values: N/A Default value: N/A |
description |
No |
String |
Explanation: Parameter template description Constraints: The description can contain a maximum of 256 characters except the following special characters: >!<"&'= N/A Values: N/A Default value: Empty |
values |
No |
Map<String,String> |
Explanation: Parameter values defined by users based on a default parameter template Constraints: N/A Values: N/A Default value: Keep the parameter values unchanged by default. |
datastore |
Yes |
ConfigurationDatastoreOption object |
Explanation: Database object. Constraints: N/A Values: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Explanation: Database type Constraints: N/A Values:
Default value: N/A |
version |
Yes |
String |
Explanation: Database version Constraints: N/A Values:
Default value: N/A |
mode |
No |
String |
Explanation: DB instance type Constraints: This parameter is mandatory when you create a GeminiDB Mongo or GeminiDB Cassandra instance with cloud native storage. Values:
Default value: If this parameter is not transferred, the parameter template of a GeminiDB Cassandra instance with classic storage is queried by default. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
configuration |
ConfigurationResult object |
Explanation: Parameter template information Values: N/A |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Explanation: Parameter template ID Values: N/A |
name |
String |
Explanation: Parameter template name Values: N/A |
datastore_version_name |
String |
Explanation: Database version name Values: N/A |
datastore_name |
String |
Explanation: Database name Values: N/A |
description |
String |
Explanation: Parameter template description Values: N/A |
created |
String |
Explanation: Creation time Values: Format: yyyy-MM-ddTHH:mm:ssZ |
updated |
String |
Explanation: Update time Values: Format: yyyy-MM-ddTHH:mm:ssZ |
mode |
String |
Explanation: DB instance type Values:
|
Example Requests
- URI example
POST https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/375d8d8fad1f43039e23d3b6c0f60a19/configurations
- Creating a parameter template for GeminiDB Cassandra instances
{ "name" : "configuration_test", "description" : "configuration_test", "values" : { "max_connections" : "10", "autocommit" : "OFF" }, "datastore" : { "type" : "cassandra", "version" : "3.11" } }
Example Responses
Status code: 200
Success
{ "configuration" : { "id" : "463b4b58d0e84e2b95605dea4552fdpr06", "name" : "configuration_test", "datastore_version_name" : "3.11", "datastore_name" : "cassandra", "description" : "configuration_test", "created" : "2020-03-09T08:27:56+0800", "updated" : "2020-03-09T08:27:56+0800" } }
Status Codes
For details, see Status Codes.
Error Codes
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