Updated on 2025-08-11 GMT+08:00

Creating a Parameter Template

Function

This API is used to create a parameter template. Before calling this API:

URI

POST /v3/{project_id}/configurations

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Parameter description

Name

Mandatory

Type

Description

name

Yes

String

Definition

Parameter template name.

Constraints

The value must be unique.

Range

The template name can contain 1 to 64 characters. Only letters (case-sensitive), digits, hyphens (-), underscores (_), and periods (.) are allowed.

Default Value

N/A

description

No

String

Definition

Parameter template description.

Constraints

N/A

Range

Up to 256 characters are displayed. Carriage return characters and the following special characters are not allowed: >!<"&'=

Default Value

It is left blank by default.

parameter_values

No

Map<String,String>

Definition

Mapping between parameter names and parameter values. You can specify parameter values based on a default parameter template.

Constraints

N/A

datastore

Yes

object

Definition

DB engine information. To obtain the value, see Querying DB Engine Versions. For details, see Table 3.

Constraints

N/A

Table 3 datastore parameter description

Name

Mandatory

Type

Description

engine_version

Yes

String

Definition

DB engine version.

Constraints

N/A

Range

N/A

Default Value

N/A

instance_mode

Yes

String

Definition

Deployment model.

Constraints

N/A

Range

  • ha: centralized deployment
  • ha:readonly: read replicas of the centralized deployment
  • independent: distributed independent deployment

Default Value

N/A

Response Parameters

Table 4 Parameter description

Parameter

Type

Description

id

String

Definition

Parameter template ID.

Range

N/A

name

String

Definition

Parameter template name.

Range

N/A

created_at

String

Definition

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.

Range

N/A

Example Request

  • Creating a parameter template for GaussDB 2.3 centralized 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

Parameter template created.
{ 
  "id" : "137eeaf0cc884ca4adffa9ebd101c115pr14", 
  "name" : "paramTemplate-del", 
  "created_at" : "2022-08-09T03:06:52+0800" 
}

Status Codes

Error Codes

For details, see Error Codes.