Updated on 2025-08-20 GMT+08:00

Applying a Parameter Template

Function

This API is used to apply a parameter template to one or more DB instances. This task will be executed asynchronously. You can query the execution status and result of applying a parameter template to DB instances based on job_id in the returned result. For details, see Obtaining Information About a Task with a Specified ID.

Constraints

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

URI

  • URI format

    PUT /v3.1/{project_id}/configurations/{config_id}/apply

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    config_id

    Yes

    Definition

    Parameter template ID.

    Constraints

    N/A

    Range

    You can obtain the value of this parameter from the id field in Table 3.

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

instance_ids

Yes

Array of strings

Definition

Instance IDs.

Constraints

N/A

Example Request

Apply a parameter template to multiple DB instances.

PUT https://{endpoint}/v3.1/0483b6b16e954cb88930a360d2c4e663/configurations/463b4b58-d0e8-4e2b-9560-5dea4552fde9/apply

{
	"instance_ids": ["73ea2bf70c73497f89ee0ad4ee008aa2in01", "fe5f5a07539c431181fc78220713aebein01"]
}

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    configuration_id

    String

    Definition

    Parameter template ID.

    Range

    N/A

    configuration_name

    String

    Definition

    Parameter template name.

    Range

    N/A

    success

    Boolean

    Definition

    Whether the parameter template is applied to all requested DB instances successfully.

    Range

    • true: The parameter template was successfully applied to all requested DB instances.
    • false: The parameter template failed to be applied to one or more requested DB instances.

    job_id

    String

    Definition

    Task flow ID.

    Range

    N/A

  • Example normal response
    {
    	"configuration_id": "cf49bbd7d2384878bc3808733c9e9d8bpr01",
    	"configuration_name": "paramsGroup-bcf9",
            "job_id":"e4942c94-9d66-458e-beb7-90601664641e",
            "success":true
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.