Updated on 2024-03-28 GMT+08:00

Applying a Parameter Template

Function

This API is used to apply a parameter template to one or more DB instances.

  • Before calling an API, you need to understand the API in Authentication.

URI

  • URI format

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

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    config_id

    Yes

    Parameter template ID.

Request

Parameter description
Table 2 Parameter description

Name

Mandatory

Type

Description

instance_ids

Yes

Array of strings

Instance IDs.

Example Request

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

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    configuration_id

    String

    Parameter template ID.

    configuration_name

    String

    Parameter template name.

    apply_results

    Array of objects

    Result of applying the parameter template.

    For details, see Table 4.

    success

    Boolean

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

    • 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

    Task ID.

    Table 4 apply_results field data structure description

    Name

    Type

    Description

    instance_id

    String

    Instance ID.

    instance_name

    String

    Instance name.

    restart_required

    Boolean

    Whether a reboot is required.

    • true: A reboot is required.
    • false: A reboot is not required.

    success

    Boolean

    Whether the parameter template is applied to the DB instance successfully.

    • true: The application was successful.
    • false: The application failed.
  • Example normal response
    {
    	"configuration_id": "cf49bbd7d2384878bc3808733c9e9d8bpr01",
    	"configuration_name": "paramsGroup-bcf9",
            "job_id":"e4942c94-9d66-458e-beb7-90601664641e",
    	"apply_results": [{
    		"instance_id": "fe5f5a07539c431181fc78220713aebein01",
    		"instance_name": "zyy1",
    		"restart_required": false,
    		"success": false
    	}, {
    		"instance_id": "73ea2bf70c73497f89ee0ad4ee008aa2in01",
    		"instance_name": "zyy2",
    		"restart_required": false,
    		"success": false
    	}],
    	"success": false
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.