หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

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 Load Balancers

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

Function

This API is used to query load balancers and display them in a list. 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.0/lbaas/loadbalancers

Request

Table 1 Parameter description

Parameter

Mandatory

Type

Description

marker

No

String

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

This parameter must be used together with limit.

limit

No

Integer

Specifies the number of load balancers on each page.

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.

tenant_id

No

String

Specifies the ID of the project where the load balancer is used.

project_id

No

String

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

id

No

String

Specifies the load balancer ID.

description

No

String

Provides supplementary information about the load balancer.

The value contains a maximum of 255 characters.

name

No

String

Specifies the load balancer name.

The value contains a maximum of 255 characters.

operating_status

No

String

Specifies the operating status of the load balancer.

This parameter is reserved, and its value can be ONLINE or FROZEN.

provisioning_status

No

String

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

It specifies the provisioning status of the load balancer.

admin_state_up

No

Boolean

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

It specifies the administrative status of the load balancer.

vip_address

No

String

Specifies the private IP address of the load balancer.

The value contains a maximum of 64 characters.

vip_port_id

No

String

Specifies the ID of the port bound to the private IP address of the load balancer.

vip_subnet_id

No

String

Specifies the ID of the IPv4 subnet where the load balancer works.

member_address

No

String

Specifies the IP address of the backend server associated with the load balancer.

member_device_id

No

String

Specifies the ID of the cloud server used as the backend server associated with the load balancer.

vpc_id

No

String

Specifies the ID of the VPC where the load balancer works.

Response

Table 2 Response parameters

Parameter

Type

Description

loadbalancers

Array

Lists the load balancers. For details, see Table 3.

loadbalancers_links

Array

Provides links to the previous or next page during pagination query, respectively. This parameter exists only in the response body of pagination query. For details, see Table 6.

Table 3 loadbalancer parameter description

Parameter

Mandatory

Type

Description

name

No

String

Specifies the load balancer name.

The value contains a maximum of 255 characters.

description

No

String

Provides supplementary information about the load balancer.

The value contains a maximum of 255 characters.

tenant_id

No

String

Specifies the ID of the project where the load balancer is used.

The value contains a maximum of 255 characters.

The value must be the same as the value of project_id in the token.

project_id

No

String

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

The value must be the same as the value of project_id in the token.

vip_subnet_id

Yes

String

Specifies the ID of the IPv4 subnet where the load balancer works. You can obtain the value by calling the API for querying subnets ({VPC endpoint}/v2.0/subnets) using the GET method.

The private IP address of the load balancer is in this subnet.

Only IPv4 subnets are supported. IPv6 subnets are not supported.

provider

No

String

Specifies the provider of the load balancer.

The value can only be vlb.

vip_address

No

String

Specifies the private IP address of the load balancer.

This IP address must be the one in the subnet specified by vip_subnet_id. If this parameter is not specified, an IP address is automatically assigned to the load balancer from the subnet specified by vip_subnet_id.

The value contains a maximum of 64 characters.

admin_state_up

No

Boolean

Specifies the administrative status of the load balancer.

This parameter is reserved. The default value is true.

Table 4 listeners parameter description

Parameter

Type

Description

id

String

Specifies the ID of the associated listener.

Table 5 pools parameter description

Parameter

Type

Description

id

String

Specifies the ID of the associated backend server group.

Table 6 loadbalancers_links parameter description

Parameter

Type

Description

href

String

Provides links to the previous or next page during pagination query, respectively.

rel

String

Specifies the prompt of the previous or next page.

The value can be next or previous. The value next indicates the Hypertext Reference (href) containing the URL of the next page, and previous indicates the href containing the URL of the previous page.

Example Request

  • Example request 1: Querying all load balancers
    GET https://{Endpoint}/v2.0/lbaas/loadbalancers
  • Example request 2: Querying load balancers by page (Each page contains one load balancer. The ID of the start load balancer is 165b6a38-5278-4569-b747-b2ee65ea84a4. The load balancer after 165b6a38-5278-4569-b747-b2ee65ea84a4 is the queried load balancer.)
    GET https://{Endpoint}/v2.0/lbaas/loadbalancers?limit=1&marker=165b6a38-5278-4569-b747-b2ee65ea84a4
  • Example request 3: Querying the load balancer using the IP address of a backend server (192.168.0.191)
    GET https://{Endpoint}/v2.0/lbaas/loadbalancers?member_address=192.168.0.181

Example Response

  • Example response 1
    {
        "loadbalancers": [
            {
                "description": "simple lb",
                "admin_state_up": true,
                "tenant_id": "1a3e005cf9ce40308c900bcb08e5320c",
                "project_id": "1a3e005cf9ce40308c900bcb08e5320c",
                "provisioning_status": "ACTIVE",
                "vip_subnet_id": "5328f1e6-ce29-44f1-9493-b128a5653350",
                "listeners": [
                    {
                        "id": "45196943-2907-4369-87b1-c009b1d7ac35"
                    }
                ],
                "vip_address": "10.0.0.2",
                "vip_port_id": "cbced4fe-6f6f-4fd6-9348-0c3d1219d6ca",
                "provider": "vlb",
                "pools": [
                    {
                        "id": "21d49cf7-4fd3-4cb6-8c48-b7fc6c259aab"
                }
                ],
                "id": "a9729389-6147-41a3-ab22-a24aed8692b2",
                "operating_status": "ONLINE",
                "tags": [],
                "name": "loadbalancer1",
                "created_at": "2018-07-25T01:54:13", 
                "updated_at": "2018-07-25T01:54:14"
            }
        ]
    }
  • Example response 2
    {
        "loadbalancers": [
            {
                "description": "",
                "provisioning_status": "ACTIVE",
                "tenant_id": "601240b9c5c94059b63d484c92cfe308",
                "project_id": "601240b9c5c94059b63d484c92cfe308",
                "admin_state_up": true,
                "provider": "vlb",
                "pools": [
                    {
                        "id": "b13dba4c-a44c-4c40-8f6e-ce7a162b9f22"
                    },
                    {
                        "id": "4b9e765f-82ee-4128-911b-0a2d9ebc74c7"
                    }
                ],
                "listeners": [
                    {
                        "id": "21c41336-d0d3-4349-8641-6e82b4a4d097"
                    }
                ],
                "vip_port_id": "44ac5d9b-b0c0-4810-9a9d-c4dbf541e47e",
                "operating_status": "ONLINE",
                "vip_address": "192.168.0.234",
                "vip_subnet_id": "9d60827e-0e5c-490a-8183-0b6ebf9084ca",
                "id": "e79a7dd6-3a38-429a-95f9-c7f78b346cbe",
                "tags": [],
                "name": "elb-robot",
                "created_at": "2018-07-25T01:54:13", 
                "updated_at": "2018-07-25T01:54:14"
            }
        ],
        "loadbalancers_links": [
            {
                "href": "https://network.Region.dc1.domainname.com/v2.0/lbaas/loadbalancers?limit=10&marker=e79a7dd6-3a38-429a-95f9-c7f78b346cbe&page_reverse=True",
                  "rel": "previous"
            }
        ]
    }
  • Example response 3
    {
        "loadbalancers": [
            {
                "description": "",
                "provisioning_status": "ACTIVE",
                "tenant_id": "601240b9c5c94059b63d484c92cfe308",
                "project_id": "601240b9c5c94059b63d484c92cfe308",
                "created_at": "2018-11-29T13:55:20",
                "admin_state_up": true,
                "update_at": "2018-11-29T13:55:21",
                "id": "c1127125-64a9-4394-a08a-ef3be8f7ef9c",
                "pools": [
                    {
                        "id": "2f6895be-019b-4c82-9b53-c4a2ac009e20"
                    }
                ],
                "listeners": [
                    {
                        "id": "5c63d176-444f-4c75-9cfe-bcb8a05a845c"
                    }
                ],
                "vip_port_id": "434ac600-b779-4428-b7a7-830e047511f1",
                "operating_status": "ONLINE",
                "vip_address": "192.168.0.181",
                "vip_subnet_id": "9a303536-417c-45dc-a6db-1234b9e1c2b2",
                "provider": "vlb",
                "tags": [],
                "name": "elb-ftci"
    
            }
        ]
    }

Status Code

For details, see Status Codes.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback