Help Center/ TaurusDB/ API Reference/ APIs (Recommended)/ Parameter Template Management/ Modifying Parameters in a Parameter Template
Updated on 2024-09-11 GMT+08:00

Modifying Parameters in a Parameter Template

Function

This API is used to modify parameters in a specified parameter template, including parameter names, descriptions, and values. Before calling this API:

Constraints

  • This API is available only for GaussDB(for MySQL) primary/standby instances (dedicated edition).
  • Default parameter templates cannot be modified.
  • The name of the modified parameter template must be different from that of a default parameter template.
  • The parameter values to be modified must be within the default value range of the specified database version.

URI

PUT /v3/{project_id}/configurations/{configuration_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

configuration_id

Yes

String

Parameter template ID.

To obtain this value, see Querying Parameter Templates.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token.

The value of X-Subject-Token in the response header is the token value.

X-Language

No

String

Request language type. The default value is en-us.

Values:

  • en-us
  • zh-cn
Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

Parameter template name.

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

The parameter template description, parameter name, and parameter value mapping cannot be empty at the same time.

description

No

String

Parameter template description. The value is left blank by default.

The description can consist of a maximum of 256 characters and cannot contain the carriage return character or the following special characters: !<"='>&

parameter_values

No

Map<String,String>

Mapping between parameter names and parameter values. You can specify parameter values based on a default parameter template. If this parameter is not specified, the original parameter information is retained.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

job_id

String

Task ID for modifying the parameter template.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Modifying parameters in a parameter template

PUT https://{endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/configurations/7a8d539ba30f43adaf1b16d08b1df4bdpr07
{
  "parameter_values" : {
    "max_user_connections" : "4"
  }
}

Example Response

Status code: 200

Success.

{
  "job_id" : "f6cb21fe-186a-4931-b20d-764ced1f1f6b"
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.