Updated on 2023-11-24 GMT+08:00

Replicating a Parameter Template

API Description

This API is used to replicate a parameter template.

Restrictions

  • Only custom parameter templates can be replicated.
  • The name of the parameter template cannot be the same as that of the default or an existing parameter template.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/configurations/{config_id}/copy

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/056538411200d4cd2f79c003c7606412/configurations/7a8d539ba30f43adaf1b16d08b1df4bdpr02

Table 1 Request parameters

Name

Type

IN

Mandatory

Description

X-Auth-Token

string

header

Yes

User token obtained from IAM. For details, see Authentication.

project_id

string

path

Yes

Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.

Table 2 Path parameters

Name

Mandatory

Type

Description

config_id

Yes

String

ID of the parameter template to be replicated.

Requests

  • Parameter description
    Table 3 Request body parameters

    Name

    Mandatory

    Type

    Description

    name

    Yes

    String

    Name of the replicated parameter template.

    The parameter template name can contain 1 to 64 characters. It can contain only letters, digits, hyphens (-), underscores (_), and periods (.).

    description

    No

    String

    Parameter template description.

    The value is left blank by default. The description must consist of a maximum of 256 characters and cannot contain the carriage return character or the following special characters: >!<"&'=

Example Request

Replicating a parameter template whose name is paramsGroup-2434
{
  "name" : "paramsGroup-2434",
  "description" : "Replicate a parameter template",
}

Responses

  • Parameter description
    Table 4 Response body parameters

    Name

    Type

    Description

    configuration_id

    String

    ID of the replicated parameter template.

  • Example response
{ 
    "configuration_id": "7b4e07852bd54016906e89461b3182cdpr02"
 }

SDK

Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.