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

Modifying the Value of a Specified Parameter for an Instance

Function

This API is used to modify the value of a specified parameter for an instance.

Constraints

  • This operation cannot be performed when the DB instance is in the abnormal or frozen state.
  • Parameters of read replicas cannot be modified.
  • Only the value of shared_preload_libraries can be modified.

URI

  • URI format

    PUT /v3/{project_id}/instances/{instance_id}/parameter/{name}

  • 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

    instance_id

    Yes

    Definition

    Instance ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    name

    Yes

    Definition

    Parameter name.

    Constraints

    N/A

    Range

    Only the shared_preload_libraries parameter can be modified.

    Default Value

    shared_preload_libraries

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

value

Yes

String

Definition

Parameter value.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Request

Change the value of shared_preload_libraries for a DB instance.

PUT https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/f569f1358436479dbcba8603c32cc4aein03/parameter/shared_preload_libraries

{
  "value" : "passwordcheck.so,pg_stat_statements,pg_sql_history"
}

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    job_id

    String

    Definition

    Task ID.

    Range

    N/A

    restart_required

    Boolean

    Definition

    Whether a reboot is required. The value can be:

    Range

    • true: indicates that a reboot is required.
    • false: indicates that a reboot is not required.
  • Example normal response
    {
      "job_id" : "e7a7535b-eb9b-45ac-a83a-020dc5016d94",  
      "restart_required" : true  
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.