
# 修改读写分离阈值
#### 功能介绍
修改指定实例的读写分离延时阈值。
**当前页面API为历史版本API，未来可能停止维护。**
- 调用接口前，您需要了解API[认证鉴权](https://support.huaweicloud.com/api-rds/rds_03_0001.html)。
- 调用接口前，您需要了解[请求Header参数说明](https://support.huaweicloud.com/api-rds/rds_03_0005.html#rds_03_0005__section479119143310)。
 
#### 调试
您可以在[API Explorer](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=RDS&api=ChangeTheDelayThreshold)中调试该接口。
#### 接口约束
- 该接口仅支持RDS for PostgreSQL 11、RDS for PostgreSQL 12修改读写分离阈值。
- 数据库实例必须已开启数据库代理 。
 
#### URI
- URI格式 PUT /v3/{*project_id* }/instances/{*instance_id*}/proxy/delay-threshold
  
- 参数说明
  表1参数说明 
  | 名称          | 是否必选 | 说明                                                                                                                               |
  |:---|:---|:---|
  | project_id  | 是    | 租户在某一region下的project ID。 获取方法请参见[获取项目ID](https://support.huaweicloud.com/api-rds/rds_03_0002.html)。 |
  | instance_id | 是    | 实例ID。                                                                                                                            |
     
  
 
#### 请求消息
参数说明
表2参数说明 
| 名称                           | 是否必选 | 参数类型    | 说明                            |
|:---|:---|:---|:---|
| delay_threshold_in_kilobytes | 是    | Integer | 延时阈值（单位：KB），取值范围为0\~10485760。 |
   
#### 请求示例
```
https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/f569f1358436479dbcba8603c32cc4aein03/proxy/delay-threshold
{
    "delay_threshold_in_kilobytes":30
}
```
#### 响应消息
- 正常响应要素说明
  表3要素说明 
  | 名称     | 参数类型   | 说明            |
  |:---|:---|:---|
  | result | String | 修改读写分离延时阈值结果。 |
     
  

- 正常响应样例
  ```
  {
   "result":"success"
  }
  ```
  

- 异常响应 请参见[异常响应结果](https://support.huaweicloud.com/api-rds/rds_01_0010.html)。
  
 
#### 状态码
- 正常 200
  
- 异常 请参见[状态码](https://support.huaweicloud.com/api-rds/rds_10_0200.html)。
  
 
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-rds/rds_10_0201.html)。
