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 instances:
- GeminiDB Cassandra
- GeminiDB Mongo
- GeminiDB Influx
- 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.
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
gaussdbfornosql:configuration:create
Write
-
-
nosql:param:create
-
URI
POST /v3/{project_id}/configurations
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Definition 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 (.). Range N/A Default Value N/A |
|
description |
No |
String |
Definition Parameter template description Constraints The description can contain a maximum of 256 characters except the following special characters: >!<"&'= N/A Range N/A Default Value Empty |
|
values |
No |
Map<String,String> |
Definition Parameter values defined by users based on a default parameter template Constraints N/A Range N/A Default Value Keep the parameter values unchanged by default. |
|
datastore |
No |
ConfigurationDatastoreOption object |
Definition Database object. Constraints This parameter is mandatory if instance_id is not transferred. Range N/A Default Value N/A |
|
instance_id |
No |
String |
Definition Instance ID, which can be obtained by following Querying Instances and Details. If no instance is available, call the API by flowing Creating an Instance to create one. If this parameter is specified, the parameter template will be created based on the instance information. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
type |
Yes |
String |
Definition Database type Constraints N/A Range
Default Value N/A |
|
version |
Yes |
String |
Definition Database version Constraints N/A Range
Default Value N/A |
|
mode |
No |
String |
Definition DB instance type Constraints This parameter is mandatory when you create a GeminiDB Mongo or GeminiDB Cassandra instance with cloud native storage. Range
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 |
Definition Parameter template information Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition Parameter template ID Range N/A |
|
name |
String |
Definition Parameter template name Range N/A |
|
datastore_version_name |
String |
Definition Database version name Range N/A |
|
datastore_name |
String |
Definition Database name Range N/A |
|
description |
String |
Definition Parameter template description Range N/A |
|
created |
String |
Definition Creation time Range Format: yyyy-MM-ddTHH:mm:ssZ |
|
updated |
String |
Definition Update time Range Format: yyyy-MM-ddTHH:mm:ssZ |
|
mode |
String |
Definition DB instance type Range
|
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" } } - Creating a parameter template based on an existing instance ID
{ "name" : "myparameter_for_influxdb", "description" : "parameter1", "instance_id" : "9136fd2a9fcd405ea4674276ce36dae8in02" }
Example Responses
Status code: 200
Successful response
{
"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