Updated on 2024-06-07 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.

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

Constraints

  • This API is in OBT. To use this API, contact customer service.
  • 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

    Project ID of a tenant in a region.

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

    instance_id

    Yes

    Instance ID.

    name

    Yes

    Parameter name. Only the value of shared_preload_libraries can be modified.

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

value

Yes

String

Parameter value.

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

    Task ID.

    restart_required

    Boolean

    Whether a reboot is required. The value can be:

    • 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.