Querying Load Balancers
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.
URI
GET /v2/{project_id}/elb/loadbalancers
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
marker |
No |
String |
Specifies the ID of the listener from which pagination query starts, that is, the ID of the last listener on the previous page. This parameter must be used together with limit. |
limit |
No |
Integer |
Specifies the number of listeners on each page. If this parameter is not set, all load balancers 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 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. The value can be ONLINE, OFFLINE, DEGRADED, DISABLED, or NO_MONITOR. The value contains a maximum of 16 characters.
NOTE:
This parameter is reserved. |
provisioning_status |
No |
String |
Specifies the provisioning status of the load balancer. The value can be ACTIVE, PENDING_CREATE, or ERROR. The value contains a maximum of 16 characters.
NOTE:
This parameter is reserved. |
admin_state_up |
No |
Boolean |
Specifies the administrative status of the load balancer. The load balancer stops receiving traffic after it is disabled. Value options: true: Enable a load balancer. false: Disable 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 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 ECS corresponding to the backend server associated with the load balancer. |
vpc_id |
No |
String |
Specifies the ID of the VPC where the load balancer works. |
enterprise_project_id |
No |
String |
Specifies the enterprise project ID. When creating a load balancer, you can assign an enterprise project to the load balancer. The value is character string 0 or all_granted_eps, or a UUID with hyphens (-). Value 0 indicates the default enterprise project. Value all_granted_eps indicates that resources in all authorized enterprise projects are queried. The default value is 0. |
Response
Parameter |
Type |
Description |
---|---|---|
loadbalancers |
Array |
Lists the load balancers. For details, see Table 4. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the load balancer ID. |
tenant_id |
String |
Specifies the ID of the project where the load balancer is used. The value contains a maximum of 255 characters. |
name |
String |
Specifies the load balancer name. The value contains a maximum of 255 characters. |
description |
String |
Provides supplementary information about the load balancer. The value contains a maximum of 255 characters. |
vip_subnet_id |
String |
Specifies the ID of the subnet where the load balancer works. |
vip_port_id |
String |
Specifies the ID of the port bound to the private IP address of the load balancer. |
provider |
String |
Specifies the provider of the load balancer. |
vip_address |
String |
Specifies the private IP address of the load balancer. The value contains a maximum of 64 characters. |
listeners |
Array |
Lists the IDs of listeners added to the load balancer. For details, see Table 6. |
pools |
Array |
Lists the IDs of backend server groups associated with the load balancer. For details, see Table 7. |
operating_status |
String |
Specifies the operating status of the load balancer. The value can be ONLINE, OFFLINE, DEGRADED, DISABLED, or NO_MONITOR. This parameter is reserved. The default value is ONLINE. The value contains a maximum of 16 characters. |
provisioning_status |
String |
Specifies the provisioning status of the load balancer. The value can be ACTIVE, PENDING_CREATE, or ERROR. This parameter is reserved. The default value is ACTIVE. The value contains a maximum of 16 characters. |
admin_state_up |
Boolean |
Specifies the administrative status of the load balancer. This parameter is reserved. The default value is true. |
tags |
Array |
Lists load balancer tags. |
created_at |
String |
Specifies the time when the load balancer was created. The UTC time is in YYYY-MM-DDTHH:MM:SS format. The value contains a maximum of 19 characters. |
updated_at |
String |
Specifies the time when the load balancer was updated. The UTC time is in YYYY-MM-DDTHH:MM:SS format. The value contains a maximum of 19 characters. |
enterprise_project_id |
String |
Specifies the enterprise project ID. When creating a load balancer, you can assign an enterprise project to the load balancer. The value is character string 0 or a UUID with hyphens (-). Value 0 indicates the default enterprise project. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the associated listener. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the associated backend server group. |
Example Request
- Example request 1
GET https://{Endpoint}/v2/1a3e005cf9ce40308c900bcb08e5320c/elb/loadbalancers
- Example request 2
GET https://{Endpoint}/v2/1a3e005cf9ce40308c900bcb08e5320c/elb/loadbalancers?limit=10&marker=165b6a38-5278-4569-b747-b2ee65ea84a4
- Example request 3
GET https://{Endpoint}/v2/601240b9c5c94059b63d484c92cfe308/elb/loadbalancers?member_address=192.168.0.198
Example Response
- Example response 1
{ "loadbalancers": [ { "description": "simple lb", "admin_state_up": true, "tenant_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", "enterprise_project_id ": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2" } ] }
- Example response 2
{ "loadbalancers": [ { "description": "", "provisioning_status": "ACTIVE", "tenant_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", "enterprise_project_id ": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2" } ] }
- Example response 3
{ "loadbalancers": [ { "description": "", "provisioning_status": "ACTIVE", "tenant_id": "601240b9c5c94059b63d484c92cfe308", "admin_state_up": true, "provider": "vlb", "pools": [ { "id": "ed75f16e-fcc6-403e-a3fb-4eae82005eab" }, { "id": "f15f2723-4135-4bf8-9259-047d92684197" } ], "listeners": [ { "id": "75045172-70e9-480d-9443-b8b6459948f7" }, { "id": "b9a99cbb-d0a1-4269-bc5f-752ec37a10c3" } ], "vip_port_id": "fb3f10f0-9417-4cf2-a82e-8f1da1687484", "operating_status": "ONLINE", "vip_address": "192.168.0.16", "vip_subnet_id": "3a450aa4-f642-4da8-b70d-cafd4a633b51", "id": "bc7ba445-035a-4464-a1a3-a62cf4a14116", "tags": [], "name": "elb-hm-test", "created_at": "2018-07-25T01:54:13", "updated_at": "2018-07-25T01:54:14", "enterprise_project_id ": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2" } ] }
Status Code
For details, see HTTP Status Codes of Load Balancers.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot