Updated on 2024-06-07 GMT+08:00

Replicating a Parameter Template

Function

This API is used to replicate a parameter template.

  • Before calling an API, you need to understand the API in Authentication.

Constraints

  • The following DB engines are supported: MySQL, PostgreSQL, and Microsoft SQL Server.

URI

  • URI format

    POST /v3/{project_id}/configurations/{config_id}/copy

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    config_id

    Yes

    Parameter template ID.

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Name of the new parameter template. The name can contain 1 to 64 characters. It is case-sensitive and can contain only letters, digits, periods (.), underscores (_), and hyphens (-).

description

No

String

Description of the new parameter template. The description can contain 0 to 256 characters and cannot contain the following characters: ! < > = & " '

Example Request

Replicate a parameter template and name the new template copy_by_v31.

POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/configurations/66251c9024774eeb9edd8663a4cbb0a1pr04/copy

{
   "name" : "copy_by_v31",
   "description" : "copy"
 }

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    id

    String

    Parameter template ID.

    name

    String

    Parameter template name.

    description

    String

    Parameter template description.

    datastore_version_name

    String

    Database version name.

    datastore_name

    String

    Database name.

    create_time

    String

    Creation time in the "yyyy-MM-ddTHH:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

    update_time

    String

    Update time in the "yyyy-MM-ddTHH:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800.

  • Example normal response
    {
      "id" : "a73a272e50ba427397e90992fbb96f3cpr04",
      "name" : "copy_by_v31",
      "description" : "copy",
      "datastore_version_name" : "2017_EE",
      "datastore_name" : "sqlserver",
      "create_time" : "2022-10-31T08:24:06+0000",
      "update_time" : "2022-10-31T08:24:06+0000"
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.