查詢SQL洞察(SQL審計)狀態
更新時間 2023-04-20 11:20:14
最近更新時間: 2023-04-20 11:20:14
分享文章
接口描述
查詢SQL洞察(SQL審計)狀態。
實例必須為運行狀態.
請求方法
GET
URI
/v1/collector/sql-collector-policy
請求參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| prodInstId | 是 | Long | 實例id | 10 |
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 狀態碼 | 800 | |
| message | String | 消息提示 | SUCCESS | |
| returnObj | Array | 返回對象 | List |
DescribeSQLCollectorPolicyVO
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| host | String | 數據庫ip | 192.168.1.11 | |
| port | Integer | 數據庫端口 | 5432 | |
| sqlCollectorStatus | String | SQL審計狀態,取值:enable | disabled | disabled |
示例
請求示例
/v1/collector/sql-collector-policy?prodInstId=10
響應示例
{
"message": "SUCCESS",
"returnObj": [
{
"host": "192.168.1.11",
"port": 5200,
"sqlCollectorStatus": "disabled"
},
{
"host": "192.168.1.12",
"port": 5200,
"sqlCollectorStatus": "disabled"
}
],
"statusCode": 800
}
錯誤碼
訪問ErrorCodes說明文檔查看更多錯誤碼。