Creating a Parameter Template
Function
This API is used to create a parameter template. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
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. For details about how to obtain the project ID, see Obtaining a Project ID. Restrictions: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
Request Parameters
Name |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Name of the parameter template, which must be unique. The template name can contain up to 64 characters. It can contain only letters (case-sensitive), digits, hyphens (-), underscores (_), and periods (.). |
description |
No |
String |
Parameter template description. This parameter is left blank by default. Up to 256 characters are displayed. Carriage return characters or special characters (>!<"&'=) are not allowed. |
parameter_values |
No |
Map<String,String> |
Mapping between parameter names and parameter values. You can specify parameter values based on a default parameter template. |
datastore |
Yes |
object |
DB engine information. To obtain the value, see Querying DB Engine Versions. For details, see Table 3. |
Name |
Mandatory |
Type |
Description |
---|---|---|---|
engine_version |
Yes |
String |
DB engine version. |
instance_mode |
Yes |
String |
Deployment model. Value:
|
Response Parameters
Parameter |
Type |
Description |
---|---|---|
id |
String |
Parameter template ID. |
name |
String |
Parameter template name. |
created_at |
String |
Creation time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is shown as +0800. |
Example Request
- Creating a parameter template for GaussDB 2.3 primary/standby instances
POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/configurations { "name": "paramTemplate", "description": "", "parameter_values": { "audit_system_object": "12294" }, "datastore": { "engine_version": "2.3", "instance_mode": "ha" } }
- Creating a parameter template with multiple user-defined parameters for GaussDB 2.3 distributed instances in the independent deployment
POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/configurations { "name": "paramTemplate", "description": "", "parameter_values": { "audit_system_object": "12294", "dn:effective_cache_size": "262143", "checkpoint_segments": "2048" }, "datastore": { "engine_version": "2.3", "instance_mode": "independent" } }
Example Response
{ "id" : "137eeaf0cc884ca4adffa9ebd101c115pr14", "name" : "paramTemplate-del", "created_at" : "2022-08-09T03:06:52+0800" }
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