Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Obtaining the killOp Rule List

Updated on 2025-02-14 GMT+08:00

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

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/2900b7b8d03e4619b8db8d43bc6234ee/instances/70ddf44609734098a8d333f25a368976in02/kill-op-rule?namespaces=test.ym&plan_summary=COLLSCAN

    Table 1 Request parameters

    Parameter

    Mandatory

    Type

    Description

    X-Auth-Token

    Yes

    String

    User token obtained from IAM. For details, see Authentication.

    project_id

    Yes

    String

    Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.

    instance_id

    Yes

    String

    Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

    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.

Requests

  • Parameter description

    None

  • Example request

    None

Responses

  • Parameter description
    Table 3 Response body parameters

    Parameter

    Type

    Description

    rules

    Array of Table 4

    List.

    total_count

    Integer

    Total number.

    Table 4 KillOpRule parameters

    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.
    • 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.

    status

    String

    The killOp rule status.
    • ENABLED: The rule is enabled.
    • DISABLED: The rule is disabled.

    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.
    • Currently, only one namespace can be configured.
    • 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.

    client_ips

    String

    Client IP address.
    • Only IPv4 is supported.
    • This parameter can be left empty, indicating that this rule has no restrictions on client IP addresses.
    • A maximum of five IP addresses can be configured at a time. If multiple IP addresses are configured, the rule takes effect when any IP address is matched.

    plan_summary

    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

    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.
    • mongos_shard indicates that this rule applies to both mongos and shard nodes.
    • mongos indicates that this rule only applies to the mongos node in a cluster.
    • shard indicates that this rule only applies to the shard node in a cluster.
    • replica indicates that this rule applies to replica sets.
  • 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 more information, see Status Code.

Error Code

For more information, see Error Code.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback