Updated on 2024-04-02 GMT+08:00

Obtaining Parameter Templates

Description

This API is used to obtain parameter templates, including all databases' default parameter templates and user-created parameter templates.

Restrictions

This API applies only to DDS Community Edition.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/configurations

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/configurations?offset=0&limit=100

Table 1 Request parameters

Name

Type

Mandatory

Description

X-Auth-Token

String

Yes

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

project_id

String

Yes

Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Type

Mandatory

Description

offset

Integer

No

The index position. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number.

limit

Integer

No

Number of records displayed on each page. The default value is 100.

Requests

None

Responses

  • Parameter description
    Table 3 Response body parameters

    Name

    Type

    Description

    total_count

    Integer

    The total number of queried records.

    configurations

    Array of objects

    The parameter template list. For details, see Table 4.

    Table 4 Data structure description of the configurations field

    Parameter

    Type

    Description

    id

    String

    Parameter template ID.

    name

    String

    Parameter template name.

    description

    String

    Parameter template description.

    datastore_version

    String

    Database version.

    datastore_name

    String

    Database type.

    node_type

    String

    Node type of the parameter template.

    • mongos: the mongos node type.
    • shard: the shard node type.
    • config: the config node type.
    • replica: the replica set type.
    • readonly: the read replica type of a replica set instance.
    • shard_readonly: the read replica type of a cluster instance.
    • single: the single node type.

    created

    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.

    updated

    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.

    user_defined

    Boolean

    Indicates whether the parameter template is created by users.

    • false: The parameter template is a default parameter template.
    • true: The parameter template is a custom template.
  • Response example
    { 
      "total_count" : 1, 
      "configurations" : [ { 
        "id" : "07fc12a8e0e94df7a3fcf53d0b5e1605pr01", 
        "name" : "test1", 
        "description" : "", 
        "datastore_name" : "mongos", 
        "node_type":"shard",
        "datastore_version" : "4.0", 
        "created" : "2017-01-01T10:00:00", 
        "updated" : "2017-01-01T10:00:00", 
        "user_defined" : true 
      } ] 
    }

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.