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

Querying Network ACL Rules

Function

This API is used to query all network ACL rules accessible to the tenant submitting the request. A maximum of 2,000 records can be returned for each query operation. If the number of records exceeds 2,000, the pagination marker will be returned.

URI

GET /v2.0/fwaas/firewall_rules

Example:

GET https://{Endpoint}/v2.0/fwaas/firewall_rules?name={firewall_rule_name}&tenant_id={tenant_id}&public={is_public}&protocol={protocol}&ip_version={ip_version}&action={action}&enabled={is_enabled}

Example of querying rules by page

GET https://{Endpoint}/v2.0/fwaas/firewall_rules?limit=2&marker=2a193015-4a88-4aa1-84ad-d4955adae707&page_reverse=False

Table 1 describes the parameters.

Table 1 Parameter description

Parameter

Mandatory

Type

Description

id

No

String

Specifies that the network ACL rule ID is used as the filtering condition.

name

No

String

Specifies that the network ACL rule name is used as the filtering condition.

description

No

String

Specifies that the network ACL rule description is used as the filtering condition.

ip_version

No

Integer

Specifies that the IP address version is used as the filtering condition.

The value can be 4 (IPv4) or 6 (IPv6).

action

No

String

Specifies that the network ACL rule action is used as the filtering condition.

The value can be allow or deny.

enabled

No

Boolean

Specifies that the network ACL rule is enabled is used as the filtering condition.

The value can be true or false.

tenant_id

No

String

Specifies that the project ID is used as the filtering condition.

marker

No

String

Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID.

This parameter can work together with the parameter limit.

  • If parameters marker and limit are not passed, resource records on the first page will be returned.
  • If the parameter marker is not passed and the value of parameter limit is set to 10, the first 10 resource records will be returned.
  • If the value of the parameter marker is set to the resource ID of the 10th record and the value of parameter limit is set to 10, the 11th to 20th resource records will be returned.
  • If the value of the parameter marker is set to the resource ID of the 10th record and the parameter limit is not passed, 11th to 2,000th resource records will be returned. The default value of limit is 2000.

limit

No

Integer

Specifies the number of records that will be returned on each page. The value is from 0 to intmax (2^31-1). The default value is 2000.

limit can be used together with marker. For details, see the parameter description of marker.

Request Parameters

None

Example Request

GET https://{Endpoint}/v2.0/fwaas/firewall_rules

Response Parameters

Table 2 Response parameter

Parameter

Type

Description

firewall_rules

Array of Firewall Rule objects

Specifies the firewall rule list. For details, see Table 4. A maximum of 2,000 records can be returned for each query operation. If the number of records exceeds 2,000, the pagination marker will be returned.

firewall_rules_links

Array of firewall_rules_link Object

Specifies the pagination information. For details, see Table 3.

Only when limit is used for filtering and the number of resources exceeds the value of limit or 2000 (default value of limit), value next will be returned for rel and a link for href.

Table 3 firewall_rules_link object

Parameter

Type

Description

href

String

Specifies the API link.

rel

String

Specifies the relationship between the API link and the API version.

Table 4 Firewall Rule objects

Attribute

Type

Description

id

String

Specifies the UUID of the network ACL rule.

name

String

Specifies the network ACL rule name.

description

String

Provides supplementary information about the network ACL rule.

tenant_id

String

Specifies the project ID.

public

Boolean

Specifies whether the firewall rule can be shared by different tenants.

protocol

String

Specifies the IP protocol.

source_port

String

Specifies the source port number or port number range.

destination_port

String

Specifies the destination port number or port number range.

ip_version

Integer

Specifies the IP protocol version.

source_ip_address

String

Specifies the source IP address or CIDR block.

destination_ip_address

String

Specifies the destination IP address or CIDR block.

action

String

Specifies action performed on traffic passing through the network ACL.

enabled

Boolean

Specifies whether the network ACL rule is enabled.

project_id

String

Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

Example Response

{
    "firewall_rules": [
        {
            "protocol": "tcp",
            "description": "update check parameter",
            "source_ip_address": "116.66.184.0/24", 
            "destination_ip_address": "0.0.0.0/0", 
            "destination_port": null, 
            "source_port": null, 
            "id": "2a193015-4a88-4aa1-84ad-d4955adae707", 
            "name": "crhfwruleupdate", 
            "tenant_id": "a1c6f90c94334bd2953d9a61b8031a68", 
            "project_id": "a1c6f90c94334bd2953d9a61b8031a68",
            "enabled": true, 
            "action": "allow", 
            "ip_version": 4, 
            "public": false
        }, 
        {
            "protocol": "tcp",
            "description": "update check parameter",
            "source_ip_address": null, 
            "destination_ip_address": null, 
            "destination_port": "40:60", 
            "source_port": "20:50", 
            "id": "db7a204c-9eb1-40a2-9bd6-ed5cfd3cff32", 
            "name": "update_firewall-role-tommy", 
            "tenant_id": "a1c6f90c94334bd2953d9a61b8031a68", 
            "project_id": "a1c6f90c94334bd2953d9a61b8031a68",
            "enabled": false, 
            "action": "deny", 
            "ip_version": 4, 
            "public": false
        }
    ],
    "firewall_rules_links": [
       {    "rel": "previous", 
            "href": "https://{Endpoint}/v2.0/fwaas/firewall_rules?marker=2a193015-4a88-4aa1-84ad-d4955adae707&page_reverse=True"
        }
    ]
}

Status Code

See Status Codes.

Error Code

See Error Codes.

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