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

Applying a Parameter Template

Description

This API is used to change a parameter template for a specified DB instance.

URI

  • URI format

    PUT https://{Endpoint}/v3/{project_id}/configurations/{config_id}/apply

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/configurations/7a8d539ba30f43adaf1b16d08b1df4bdpr02/apply

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.

config_id

String

Yes

Parameter template ID.

Requests

  • Parameter description
    Table 2 Request body parameters

    Name

    Mandatory

    Type

    Description

    entity_ids

    Yes

    Array of strings

    Instance IDs, group IDs, or node IDs. You can call the API used for querying instances and details to obtain the value. If you do not have an instance, you can call the API used for creating an instance.
    • If the DB instance type is cluster and the shard or config parameter template is to be changed, the value is the group ID. If the parameter template of the mongos node is changed, the value is the node ID.
    • If the DB instance to be changed is a replica set instance or a single node instance, the value is the instance ID.

Example Request

Applying a parameter template whose entity_ids is 73ea2bf70c73497f89ee0ad4ee008aa2no02 to a specified DB instance
{
  "entity_ids": [
    "73ea2bf70c73497f89ee0ad4ee008aa2no02"
  ]
}

Responses

  • Parameter description
    Table 3 Response body parameters

    Name

    Type

    Description

    job_id

    String

    Indicates the ID of the asynchronous task for applying a parameter template.

  • Response example
    { 
      "job_id" : "bf26cf3c-d046-4080-bb45-f114be7afa5f" 
    }

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.