Obtaining the killOp Rule List
API Description
This API is used to obtain the killOp rule list.
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.
URI
- URI format
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/kill-op-rule
-
Table 1 Parameter description Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID of a tenant in a region.
instance_id
Yes
String
Instance ID.
Table 2 Query parameters Parameter
Mandatory
Type
Description
operation_types
No
String
SQL type.- insert: operation for inserting data.
- update: operation for updating data.
- query: operation for querying data.
- command: command operation.
- remove: operation for deleting data.
- getmore: operation for obtaining more data.
namespaces
No
String
Namespace of a table. The value is in the format of database_name or database_name.table_name.- This parameter can be left empty, indicating that this rule has no restrictions on table namespaces.
- If this parameter is set to a database name, this rule applies to operations on all collections in the database.
- If this parameter is set to a value in the format of database_name.collection_name, this rule only applies to operations on the collection.
status
No
String
The killOp rule status.- ENABLED: The rule is enabled.
- DISABLED: The rule is disabled.
plan_summary
No
String
Execution plan. By default, this parameter is left blank, indicating that this rule has no restrictions on execution plans.- COLLSCAN
- SORT_KEY_GENERATOR
- SKIP
- LIMIT
- GEO_NEAR_2DSPHERE
- GEO_NEAR_2D
- AGGREGATE
- OR
offset
No
Integer
Index offset.
If offset is set to N, the resource query starts from the N+1 piece of data. The default value is 0, indicating that the query starts from the first piece of data. The value must be a positive number or 0.
limit
No
Integer
Maximum records to be queried.- The value ranges from 1 to 100.
- If this parameter is not transferred, the first 100 records are queried by default.
Request Parameters
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Auth-Token |
string |
header |
Yes |
User token |
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
rules |
Array of Table 5 |
List. |
|
total_count |
Integer |
Total number. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
ID of the killOp rule. |
|
operation_types |
String |
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.
|
|
status |
String |
The killOp rule status.
|
|
namespaces |
String |
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 |
String |
Client IP address.
|
|
plan_summary |
String |
Execution plan. By default, this parameter is left blank, indicating that this rule has no restrictions on execution plans.
|
|
max_concurrency |
Integer |
Maximum number of concurrent SQL statements. The value cannot be a negative number. This parameter can be left empty. The default value is 0, indicating that this rule has no restrictions on the maximum number of concurrent SQL statements. The value ranges from 1 to 100000. |
|
secs_running |
Integer |
Maximum execution duration of a single SQL statement. The value cannot be a negative number. This parameter can be left empty. The default value is 0, indicating that this rule has no restrictions on the maximum execution duration of a single SQL statement. The unit is second. The value ranges from 2 to 86400. |
|
node_type |
String |
Node type.
|
- Example response
killOp rule list:
{ "rules" : [ { "operation_types" : [ "query", "insert" ], "namespaces" : [ "db.collections" ], "client_ips" : [ "172.168.201.144" ], "status" : "ENABLED", "id" : "f6f2cea4-ce40-4d4c-9d2f-61253d215811", "plan_summary" : "COLLSCAN", "max_concurrency" : 0, "secs_running" : 5, "node_type" : "replica" } ], "total_count" : 1 }
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