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
On this page

Querying Security Group Rule Changes

Updated on 2024-07-30 GMT+08:00

Scenarios

CTS records the changes made to security group rules. You can query the change details of:
  • New security group rules
  • Modified security group rules
  • Deleted security group rules

Precautions

  • To use CTS to record security group rule changes, you need to enable CTS first.
  • CTS records operations performed on each cloud service. You can query specific operations by trace name, resource type, or operation time. Table 1 lists the operations on security group rules supported by CTS.
    Table 1 Operations on security group rules supported by CTS

    Operation

    Trace Name

    Resource Type

    Adding a security group rule

    createSecurity-group-rule

    security-group-rules

    Modifying a security group rule

    updateSecurity-group-rule

    security-group-rules

    Deleting a security group rule

    deleteSecurity-group-rule

    security-group-rules

Procedure

The following describes how to view the rule described in Table 2 that is added to security group Sg-A.
Table 2 The new security group rule

Direction

Action

Type

Protocol & Port

Source

Last Modified

Inbound

Allow

IPv4

TCP: 23

10.0.0.0/16

June 19, 2024 10:46:07 GMT+08:00

  1. Log in to the CTS console, search for the operations by trace name (createSecurity-group-rule in this example) and locate the specific operation by operation time.

    For details, see Querying Real-Time Traces.

    Figure 1 The trace list for new security group rules
  2. In the trace list, locate the target trace and click its name.

    On the Trace Overview page, you can view the details about the operation. Table 3 provides the detailed information about the operation, including operator ID and details about the security group rules.

    NOTE:

    The trace details in Table 3 are only for your reference. The actual information may vary.

    Table 3 The trace details for the new security group rule

    Example Command Output

    Description

    "source_ip": "124.71.XX.146",

    IP address of the client that performs the operation. If this parameter is left blank, the operation is performed by the system. In this example, the IP address is 124.71.XX.146.

      "user": {
        "access_key_id": "HSTA205XXXXXC4MHAE",
        "account_id": "3c24f6f885294XXXXX93ce075fbd",
        "user_name": "cts-test-01",
        "domain": {
          "name": "cts-test",
          "id": "3c24f6f885294XXXXX93ce075fbd"
        },
      "name": "cts-test-01",
      "principal_is_root_user": "false",
      "id": "a26ee7e7224XXXXXe4a28a9ce503",
    Account of the operator who performs the operation. Key parameters are described as follows:
    • name under domain: indicates the account name. In this example, the account name is cts-test.
    • id under domain: indicates the account ID. In this example, the ID is 3c24f6f885294XXXXX93ce075fbd.
    • name: IAM username. In this example, the username is cts-test-01, which is an IAM user under account cts-test.
    • id: IAM user ID. In this example, the ID is a26ee7e7224XXXXXe4a28a9ce503.

    For details about more parameters of CTS traces, see the response parameter description in Trace Structure.

    "response": "{\"request_id\":\"8d2d1111cafaXXX9b49d53e2da38f\",\"security_group_rules\":[{\"id\":\"b6acda6e-0976-XXXX-82bc-a8093cbd591d\",\"project_id\":\"15289aca74eXXXa37dea0315d99\",\"security_group_id\":\"3730d371-3111-4ace-XXXX-b00b7259e178\",\"remote_group_id\":null,\"direction\":\"ingress\",\"protocol\":\"tcp\",\"description\":\"\",\"created_at\":\"2024-06-19T02:46:07Z\",\"updated_at\":\"2024-06-19T02:46:07Z\",\"ethertype\":\"IPv4\",\"remote_ip_prefix\":\"10.0.0.0/16\",\"multiport\":\"23\",\"remote_address_group_id\":null,\"action\":\"allow\",\"priority\":1}]}",
    Details about the security group rule in response. Key parameters are described as follows:
    • direction: indicates the direction of the security group rule. ingress indicates the inbound direction, and egress indicates the outbound direction. In this example, ingress is returned, indicating an inbound rule is added.
    • protocol: indicates the protocol of the security group rule. In this example, the protocol is TCP.
    • ethertype: indicates the source IP address version. In this example, the version is IPv4.
    • remote_ip_prefix: indicates the source or destination of the security group rule. In this example, an inbound rule is added, so this parameter indicates IP address range 10.0.0.0/16.
    • multiport: indicates the port used to filter traffic. In this example, the port is 23.
    • action: indicates whether to allow or deny traffic. allow indicates traffic is allowed, while deny indicates traffic is denied. In this example, the action is allow.
    • priority: indicates the priority of the security group rule. In this example, the priority is 1.

    For details about more parameters of security group rules, see Querying a Security Group Rule.

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