開啟或關閉實例的SQL洞察(SQL審計)功能
更新時間 2022-10-28 18:39:03
最近更新時間: 2022-10-28 18:39:03
分享文章
接口描述
開啟或關閉實例的SQL洞察(SQL審計)功能。
請求方法
PUT
URI
/v1/collector/sql-collector-policy
請求參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| prodInstId | 是 | Long | 實例id | 34 | |
| sqlCollectorStatus | 是 | String | 開啟或關閉SQL洞察(SQL審計),取值:enable| disabled | enable | |
| restartInstance | 否 | boolean | 是否重啟實例,默認false。若要生效,需要重啟實例 | true |
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 狀態碼 | 800 | |
| message | String | 消息提示 | SUCCESS | |
| returnObj | Object | 返回對象 |
示例
請求示例
{URI}?/v1/collector/sql-collector-policy
{
"prodInstId":34,
"sqlCollectorStatus":"enable",
"restartInstance": true
}
響應示例
{
"returnObj": {},
"message":"SUCCESS",
"statusCode": 800
}
錯誤碼
訪問ErrorCodes說明文檔查看更多錯誤碼。