Creating a killOp Rule
API Description
This API is used to create a killOp rule.
Restrictions
- This API applies only to replica set and cluster instances.
- This API is available only for DDS 3.4 or later.
- This API is available only for an instance node with 4 or more vCPUs.
- A maximum of 10 killOp rules can be created for a DB instance.
- The rule is disabled after being created.
URI
Request Parameters
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Auth-Token |
string |
header |
Yes |
User token |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
operation_types |
Yes |
Array of strings |
SQL type. A maximum of six statement types can be selected at a time. If multiple types are selected, the rule takes effect when any type is matched.
|
|
namespaces |
No |
Array of strings |
Namespace of a table. The value is in the format of database_name or database_name.table_name. If multiple namespaces are configured at the same time, the rule takes effect when any namespace is matched.
|
|
client_ips |
No |
Array of strings |
Client IP address.
|
|
plan_summary |
No |
String |
Execution plan. By default, this parameter is left blank, indicating that this rule has no restrictions on execution plans.
|
|
max_concurrency |
No |
Integer |
Maximum number of concurrent SQL statements.
|
|
secs_running |
No |
Integer |
Maximum execution duration of a single SQL statement.
|
|
node_type |
Yes |
String |
Node type.
|
- Example request
{ "operation_types" : [ "query", "insert" ], "namespaces" : [ "db.collections" ], "client_ips" : [ "172.168.201.144" ], "plan_summary" : "COLLSCAN", "max_concurrency" : 0, "secs_running" : 5, "node_type" : "replica" }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot