Creating a Parameter Template
Function
This API is used to create a parameter template. Before calling this API:
- Learn how to authenticate this API.
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 the value, 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. |
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 centralized instances
POST https://gaussdb-opengauss.eu-west-101.myhuaweicloud.eu/v3/0483b6b16e954cb88930a360d2c4e663/configurations { "name": "paramTemplate", "description": "", "parameter_values": { "audit_system_object": "12294" }, "datastore": { "engine_version": "2.3", "instance_mode": "ha" } }
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 Codes
For details, see Error Codes.