Updated on 2023-10-18 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.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

If the following response body is returned for calling the API used to obtain a user token, the request is successful.

After the request is processed, the value of X-Subject-Token in the message header is the token value.

X-Language

No

String

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

Value:

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

Parameter

Mandatory

Type

Description

name

No

String

Parameter template name.

Value:

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.

Value:

The description can consist of up to 256 characters, and cannot contain the carriage return characters or 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.