解除指定資源控制規則與 PolarDB MySQL 叢集中使用者、資料庫、查詢或連線之間的繫結關係。解除繫結成功後,該資源控制規則不再限制對應目標物件的 CPU 配額。
介面說明
Resource Control 用於限制 PolarDB MySQL 叢集中指定使用者、資料庫、查詢或連線可使用的 CPU 資源。本期開放建立、修改、刪除、繫結和解除繫結能力,不提供 Resource Control CPU 使用率查詢能力。
使用限制
僅適用於支援 Resource Control 的 PolarDB MySQL 叢集版,PolarDB MySQL 標準版不支援。
叢集核心參數 loose_enable_resource_control 必須設定為 ON。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求文法
POST HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
否 |
PolarDB 叢集所在地域的 ID。 說明
您可以透過介面 DescribeRegions 查看地域 ID 詳情。 |
cn-beijing |
| DBClusterId |
string |
是 |
PolarDB 叢集 ID。 |
pc-************** |
| ResourceControlName |
string |
是 |
資源控制規則名稱。長度為 1~63 個 ASCII 位元組,必須以英文字母開頭,僅支援英文字母、數字和底線。 |
test_rc |
| TargetType |
string |
是 |
解除繫結目標的類型。取值:USER、DATABASE、QUERY、CONNECTION,大小寫不敏感。 |
USER |
| TargetValue |
string |
是 |
解除繫結目標的值,格式與 BindResourceControl 中對應目標類型的 TargetValue 相同。 |
app_user |
TargetValue 取值規則:
| TargetType | TargetValue 說明 | 範例值 |
| USER | 資料庫使用者名稱。長度為 1~63 個 ASCII 位元組,必須以英文字母開頭,僅支援英文字母、數字和底線。不支援包含 Host、萬用字元或引用符號的帳號。 | app_user |
| DATABASE | 資料庫名稱。長度為 1~63 個 ASCII 位元組,必須以英文字母開頭,僅支援英文字母、數字和底線。 | order_db |
| QUERY | 查詢 ID。必須是不含符號、空格和前導零的十進位正整數,取值範圍為 1~Long.MAX_VALUE。 | 12345 |
| CONNECTION | 連線 ID。必須是不含符號、空格和前導零的十進位正整數,取值範圍為 1~Long.MAX_VALUE。 | 67890 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
22C0ACF0-DD29-4B67-9190-B7A48C****** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "22C0ACF0-DD29-4B67-9190-B7A48C******"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidParameters.Malformed | The specified Resource Control parameter is not valid. | |
| 400 | Database.ConnectError | Unable to connect to the database instance. | |
| 400 | Database.ExecError | The Resource Control operation could not be executed on the database instance. | |
| 403 | IncorrectDBInstanceType | Resource Control is not supported for the current DB cluster edition or kernel configuration. | |
| 403 | AuthorizationFailure | The request is not authorized to operate Resource Control. | |
| 404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | 目前的記錄中不存在提供的 DBClusterId。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。