Unbinds a specified resource control rule from a user, database, query, or connection in a PolarDB for MySQL cluster. After the unbinding is successful, the resource control rule no longer limits the CPU quota of the corresponding target object.
Operation description
Resource Control is used to limit the CPU resources that can be used by a specified user, database, query, or connection in a PolarDB for MySQL cluster. This release provides the capabilities to create, modify, delete, attach, and unbind resource control rules. It does not provide the capability to query Resource Control CPU usage.
Before you begin
This operation applies only to PolarDB for MySQL Cluster Edition clusters that support Resource Control. PolarDB for MySQL Standard Edition is not supported.
The cluster kernel parameter loose_enable_resource_control must be set to ON.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID of the PolarDB cluster. Note
You can call the DescribeRegions operation to query region IDs. |
cn-beijing |
| DBClusterId |
string |
Yes |
The PolarDB cluster ID. |
pc-************** |
| ResourceControlName |
string |
Yes |
The name of the resource control rule. The name must be 1 to 63 ASCII bytes in length, start with a letter, and can contain only letters, digits, and underscores. |
test_rc |
| TargetType |
string |
Yes |
The type of the target to unbind. Valid values: USER, DATABASE, QUERY, CONNECTION. The value is case-insensitive. |
USER |
| TargetValue |
string |
Yes |
The value of the target to unbind. The format is the same as the TargetValue for the corresponding target type in the BindResourceControl operation. |
app_user |
Rules for TargetValue:
| TargetType | TargetValue description | Example |
| USER | The database username. The name must be 1 to 63 ASCII bytes in length, start with a letter, and can contain only letters, digits, and underscores. Accounts that contain a host, wildcard, or quotation marks are not supported. | app_user |
| DATABASE | The database name. The name must be 1 to 63 ASCII bytes in length, start with a letter, and can contain only letters, digits, and underscores. | order_db |
| QUERY | The query ID. The value must be a positive decimal integer without signs, spaces, or leading zeros. Valid values: 1 to Long.MAX_VALUE. | 12345 |
| CONNECTION | The connection ID. The value must be a positive decimal integer without signs, spaces, or leading zeros. Valid values: 1 to Long.MAX_VALUE. | 67890 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
22C0ACF0-DD29-4B67-9190-B7A48C****** |
Examples
Success response
JSON format
{
"RequestId": "22C0ACF0-DD29-4B67-9190-B7A48C******"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. | The specified DBClusterId parameter does not exist in the current record. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.