هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

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
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 Forwarding Rules

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

Function

This API is used to query forwarding rules. Filter query and pagination query are supported. Unless otherwise specified, exact match is applied.

Constraints

Parameters marker, limit, and page_reverse are used for pagination query. Parameters marker and page_reverse take effect only when they are used together with parameter limit.

URI

GET /v2/{project_id}/elb/l7policies/{l7policy_id}/rules

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

l7policy_id

Yes

String

Specifies the forwarding policy ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

marker

No

String

Specifies the ID of the forwarding rule from which pagination query starts, that is, the ID of the last forwarding rule on the previous page.

This parameter must be used together with limit.

limit

No

Integer

Specifies the number of forwarding rules on each page. If this parameter is not set, all forwarding rules are queried by default.

page_reverse

No

Boolean

Specifies the page direction. The value can be true or false, and the default value is false. The last page in the list requested with page_reverse set to false will not contain the "next" link, and the last page in the list requested with page_reverse set to true will not contain the "previous" link.

This parameter must be used together with limit.

id

No

String

Specifies the forwarding rule ID.

tenant_id

No

String

Specifies the ID of the project where the forwarding rule is used.

The value contains a maximum of 255 characters.

project_id

No

String

Specifies the ID of the project to which the forwarding rule belongs. This parameter has the same meaning as tenant_id.

admin_state_up

No

Boolean

Specifies the administrative status of the forwarding rule.

type

No

String

Specifies the match type of a forwarding rule.

The value can be:

  • HOST_NAME: matches the domain name in the request.
  • PATH: matches the path in the request.

The match type of forwarding rules in a forwarding policy must be unique.

compare_type

No

String

Specifies the match mode. The options are as follows:

When type is set to HOST_NAME, the value of this parameter can only be the following:

  • EQUAL_TO: indicates exact match.

When type is set to PATH, the value of this parameter can be one of the following:

  • REGEX: indicates regular expression match.
  • STARTS_WITH: indicates prefix match.
  • EQUAL_TO: indicates exact match.

invert

No

Boolean

Specifies whether reverse matching is supported.

The value can be true or false. The default value is false.

This parameter is reserved.

key

No

String

Specifies the key of the match content. The default value is null.

This parameter is reserved.

The value contains a maximum of 255 characters.

value

No

String

Specifies the value of the match content.

The value contains a maximum of 128 characters.

  • When type is set to HOST_NAME, the value can contain a maximum of 100 characters that contain only letters, digits, hyphens (-), and periods (.), and must start with a letter or digit.
  • When type is set to PATH, the value can contain a maximum of 128 characters. When compare_type is set to STARTS_WITH or EQUAL_TO, the value must start with a slash (/) and can contain only letters, digits, and special characters _~';@^-%#&$.*+?,=!:| \/()[]{}

provisioning_status

No

String

This parameter is reserved, and its value can only be ACTIVE.

It specifies the provisioning status of the forwarding rule.

Request

None

Response

Table 3 Parameter description

Parameter

Type

Description

rules

Array of Rules objects

Lists the forwarding rules. For details, see Table 4.

Table 4 rules parameter description

Parameter

Type

Description

id

String

Specifies the forwarding rule ID.

tenant_id

String

Specifies the ID of the project where the forwarding rule is used.

The value contains a maximum of 255 characters.

project_id

String

Specifies the ID of the project to which the forwarding rule belongs. This parameter has the same meaning as tenant_id.

admin_state_up

Boolean

Specifies the administrative status of the forwarding rule. The value can only be true.

type

String

Specifies the match type of a forwarding rule.

The value can be:

  • HOST_NAME: matches the domain name in the request.
  • PATH: matches the path in the request.

compare_type

String

Specifies the match mode. The options are as follows:

When type is set to HOST_NAME, the value of this parameter can only be the following:

  • EQUAL_TO: indicates exact match.

When type is set to PATH, the value of this parameter can be one of the following:

  • REGEX: indicates regular expression match.
  • STARTS_WITH: indicates prefix match.
  • EQUAL_TO: indicates exact match.

invert

Boolean

Specifies whether reverse matching is supported.

The value can be true or false. The default value is false.

This parameter is reserved.

key

String

Specifies the key of the match content. The default value is null.

This parameter is reserved.

The value contains a maximum of 255 characters.

value

String

Specifies the value of the match content.

The value contains a maximum of 128 characters.

  • When type is set to HOST_NAME, the value can contain a maximum of 100 characters that contain only letters, digits, hyphens (-), and periods (.), and must start with a letter or digit.
  • When type is set to PATH, the value can contain a maximum of 128 characters. When compare_type is set to STARTS_WITH or EQUAL_TO, the value must start with a slash (/) and can contain only letters, digits, and special characters _~';@^-%#&$.*+?,=!:| \/()[]{}

provisioning_status

String

This parameter is reserved, and its value can only be ACTIVE.

It specifies the provisioning status of the forwarding rule.

Example Request

  • Example request: Querying all forwarding rules of a specific forwarding policy
    GET https://{Endpoint}/v2/a31d2bdcf7604c0faaddb058e1e08819/elb/l7policies/5ae0e1e7-5f0f-47a1-b39f-5d4c428a1586/rules

Example Response

  • Example response
    {
        "rules": [
            {
                "compare_type": "EQUAL_TO", 
                "provisioning_status": "ACTIVE",
                "admin_state_up": true, 
                "tenant_id": "a31d2bdcf7604c0faaddb058e1e08819", 
                "project_id": "a31d2bdcf7604c0faaddb058e1e08819", 
                "invert": false, 
                "value": "www.test.com", 
                "key": null, 
                "type": "HOST_NAME", 
                "id": "67d8a8fa-b0dd-4bd4-a85b-671db19b2ef3"
            }, 
            {
                "compare_type": "EQUAL_TO",
                "provisioning_status": "ACTIVE", 
                "admin_state_up": true, 
                "tenant_id": "a31d2bdcf7604c0faaddb058e1e08819",
                "project_id": "a31d2bdcf7604c0faaddb058e1e08819",
                "invert": false, 
                "value": "/aaa.html", 
                "key": null, 
                "type": "PATH", 
                "id": "f02b3bca-69d2-4335-a3fa-a8054e996213"
            }
        ]
    }

Status Code

For details, see Status 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