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

Comparing Parameter Templates

API Description

This API is used to compare two parameter templates.

Restrictions

  • Only parameter templates of the same version and type can be compared. For example, a mongos parameter template of cluster 4.0 can be compared only with a mongos parameter template of cluster 4.0.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/configurations/comparison

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/configurations/comparison

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.

Requests

  • Parameter description
    Table 2 Request body parameters

    Name

    Type

    Mandatory

    Description

    source_configuration_id

    String

    Yes

    ID of the source parameter template to be compared.

    target_configuration_id

    String

    Yes

    ID of the target parameter template to be compared.

Example Request

Comparing two parameter templates
{
  "source_configuration_id" : "0764fdcd949b411ba76c2b762b80c212pr02",
  "target_configuration_id" : "fa42c57bb62844e490052f2ff9d5a264pr02"
}

Responses

  • Parameter description
    Table 3 Response body parameters

    Name

    Type

    Description

    differences

    Array of Table 5-5 objects

    Set of differences between parameters.

    Table 4 DiffDetails

    Name

    Type

    Description

    parameter_name

    String

    Parameter name.

    source_value

    String

    Parameter value in the source parameter template.

    target_value

    String

    Parameter value in the target parameter template.

  • Example response
    { 
      "differences" : [ { 
        "parameter_name" : "connPoolMaxConnsPerHost", 
        "source_value" : "600", 
        "target_value" : "601" 
      }, { 
        "parameter_name" : "connPoolMaxShardedConnsPerHost", 
        "source_value" : "600", 
        "target_value" : "601" 
      }, { 
        "parameter_name" : "cursorTimeoutMillis", 
        "source_value" : "600000", 
        "target_value" : "600001" 
      }, { 
        "parameter_name" : "userCacheInvalidationIntervalSecs", 
        "source_value" : "30", 
        "target_value" : "31" 
      } ] 
    }

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.