doc-exports/elb/api-ref/ListLoadBalancers.rst

83 KiB

Querying Load Balancers

Function

This API is used to query all load balancers. Both filtered query and pagination query are supported.

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 /v3/{project_id}/elb/loadbalancers

Table 1 Path parameters
Parameter Mandatory Type Description
project_id Yes String

Specifies the project ID.

Minimum: 1

Maximum: 255

Table 2 Query parameters
Parameter Mandatory Type Description
marker No String

Specifies the ID of the last record on the previous page.

Note:

  • This parameter must be used together with limit.
  • If this parameter is not specified, the first page will be queried.
  • This parameter cannot be left blank or set to an invalid ID.
limit No Integer

Specifies the number of records on each page.

Minimum: 0

Maximum: 2000

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 Array

Specifies the load balancer ID.

Multiple IDs can be queried in the format of id=xxx&id=xxx.

name No Array

Specifies the load balancer name.

Multiple names can be queried in the format of name=xxx&name=xxx.

description No Array

Provides supplementary information about the load balancer.

Multiple descriptions can be queried in the format of descri ption=xxx&description=xxx.

admin_state_up No Boolean

Specifies the administrative status of the load balancer.

This parameter is unsupported. Please do not use it.

provisioning_status No Array

Specifies the provisioning status of the load balancer. The value can only be ACTIVE, indicating that the load balancer is provisioned successfully.

Multiple provisioning statuses can be queried in the format of provisioning_status=xx x&provisioning_status=xxx.

operating_status No Array

Specifies the operating status of the load balancer. The value can only be ONLINE, indicating that the load balancer is working normally.

Multiple operating statuses can be queried in the format of operating_status =xxx&operating_status=xxx.

guaranteed No Boolean Specifies whether the load balancer is a dedicated load balancer. The value can only be true.
vpc_id No Array

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

Multiple IDs can be queried in the format of vpc_id=xxx&vpc_id=xxx.

vip_port_id No Array

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

Multiple IDs can be queried in the format of vip_po rt_id=xxx&vip_port_id=xxx.

vip_address No Array

Specifies the virtual IP address bound to the load balancer.

Multiple virtual IP addresses can be queried in the format of vip_ad dress=xxx&vip_address=xxx.

vip_subnet_cidr_id No Array

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

Multiple IDs can be queried in the format of vip_subnet_cidr_id=x xx&vip_subnet_cidr_id=xxx.

l4_flavor_id No Array

Specifies the ID of the flavor at Layer 4.

Multiple IDs can be queried in the format of l4_flavo r_id=xxx&l4_flavor_id=xxx.

l4_scale_flavor_id No Array

Specifies the elastic flavor that is reserved for now.

Multiple flavors can be queried in the format of l4_scale_flavor_id=x xx&l4_scale_flavor_id=xxx.

ipv6_vip_address No Array

Specifies the IPv6 address bound to the load balancer.

Multiple IPv6 addresses can be queried in the format of ipv6_vip_address =xxx&ipv6_vip_address=xxx.

This parameter is unsupported. Please do not use it.

ipv6_vip_virsubnet_id No Array

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

Multiple IDs can be queried in the format of ipv6_vip_virsubnet_id=xxx& ipv6_vip_virsubnet_id=xxx.

This parameter is unsupported. Please do not use it.

ipv6_vip_port_id No Array

Specifies the ID of the port bound to the IPv6 address of the load balancer.

Multiple ports can be queried in the format of ipv6_vip_port_id =xxx&ipv6_vip_port_id=xxx.

This parameter is unsupported. Please do not use it.

availability_zone_list No Array

Specifies the list of AZs where the load balancer is created. You can query the AZs by calling the API (/v3/{project_i d}/elb/availability-zones).

Multiple AZs can be queried in the format of a vailability_zone_list=xxx&a vailability_zone_list=xxx.

eips No Array

Specifies the EIP bound to the load balancer.

The following is an example:

"eips": [ { "eip_id": "e9b72a9d-42 75-455e-a724-853504e4d9c6", "eip_address": "88.88.14.122", "ip_version": 4 } ]

Multiple EIPs can be queried in the format of eips=e ip_id=xxx&eips=eip_id=xxx.

l7_flavor_id No Array

Specifies the ID of the flavor at Layer 7.

Multiple flavors can be queried in the format of l7_flavo r_id=xxx&l7_flavor_id=xxx.

l7_scale_flavor_id No Array

Specifies the elastic flavor that is reserved for now.

Multiple flavors can be queried in the format of l7_scale_flavor_id=x xx&l7_scale_flavor_id=xxx.

member_device_id No Array

Specifies the ID of the cloud server that serves as a backend server. This parameter is used only as a query condition and is not included in the response.

Multiple IDs can be queried in the format of member_device_id =xxx&member_device_id=xxx.

member_address No Array Specifies the private IP address of the backend server. This parameter is used only as a query condition and is not included in the response.
enterprise_project_id No Array

Specifies the enterprise project ID.

  • If this parameter is not passed, resources in the default enterprise project are queried, and authentication is performed based on the default enterprise project.
  • If this parameter is passed, its value can be the ID of an existing enterprise project or all_granted_eps.

If the value is a specific ID, resources in the specific enterprise project are required. If the value is all_granted_eps, resources in all enterprise projects are queried.

Multiple IDs can be queried in the format of enterprise_project_id=xxx& enterprise_project_id=xxx.

This parameter is unsupported. Please do not use it.

publicips No Array

Specifies the public IP address bound to the load balancer.

The following is an example:

"publicips": [ { "publicip_id": "e9b72a9d-42 75-455e-a724-853504e4d9c6", "publicip_address": "88.88.14.122", "publicip_ip_version": 4 } ]

Multiple EIPs can be queried in the format of publicips=publicip_id=xxx& publicips=publicip_id=xxx.

ip_version No Array

Specifies the IP version. The value can be 4 (IPv4) or 6 (IPv6).

Multiple versions can be queried in the format of ip_v ersion=xxx&ip_version=xxx.

IPv6 is unsupported. The value cannot be 6.

Request Parameters

Table 3 Request header parameters
Parameter Mandatory Type Description
X-Auth-Token No String Specifies the token used for IAM authentication.

Response Parameters

Status code: 200

Table 4 Response body parameters
Parameter Type Description
loadbalancers Array of LoadBalancer objects Lists the load balancers.
page_info Page Info object Provides load balancer pagination information.
request_id String Specifies the request ID. The value is automatically generated.
Table 5 LoadBalancer
Parameter Type Description
id String

Specifies the load balancer ID.

Default: Automatically generated

description String

Provides supplementary information about the load balancer.

Minimum: 1

Maximum: 255

provisioning_status String Specifies the provisioning status of the load balancer. The value can only be ACTIVE.
admin_state_up Boolean

Specifies the administrative status of the load balancer. The value can only be true.

This parameter is unsupported. Please do not use it.

Default: true

provider String

Specifies the provider of the load balancer. The value can only be vlb.

Default: vlb

pools Array of PoolRef <#Li stLoadBalancers__response_PoolRef>__ objects Lists the IDs of backend server groups associated with the load balancer.
listeners Array of ListenerRef <#ListLo adBalancers__response_ListenerRef>__ objects Lists the IDs of listeners added to the load balancer.
operating_status String

Specifies the operating status of the load balancer. The value can only be ONLINE.

Minimum: 1

Maximum: 16

vip_address String

Specifies the private IPv4 address bound to the load balancer.

Minimum: 1

Maximum: 64

vip_subnet_cidr_id String

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

Minimum: 1

Maximum: 36

name String

Specifies the name of the load balancer.

Minimum: 1

Maximum: 255

project_id String

Specifies the project ID of the load balancer.

Minimum: 1

Maximum: 32

vip_port_id String

Specifies the ID of the port bound to the virtual IP address (the value of vip_address) of the load balancer.

When you create a dedicated load balancer, the system automatically creates a port for the load balancer and associates the port with a default security group. However, security group rules containing the port will not affect traffic to and from the load balancer.

tags Array of Tag objects Lists the tags added to the load balancer.
created_at String

Specifies the time when the load balancer was created.

Minimum: 1

Maximum: 20

updated_at String

Specifies the time when the load balancer was updated.

Minimum: 1

Maximum: 20

guaranteed Boolean

Specifies whether the load balancer is a dedicated load balancer.

The value can be true or false. true indicates a dedicated load balancer, and false indicates a shared load balancer. When dedicated load balancers are launched in the eu-de region, either true or false will be returned when you use the API to query or update a load balancer.

Default: true

vpc_id String Specifies the ID of the VPC where the load balancer works.
eips Array of EipInfo <#Li stLoadBalancers__response_EipInfo>__ objects Specifies the EIP bound to the load balancer.
ipv6_vip_address String

Specifies the IPv6 address bound to the load balancer.

This parameter is unsupported. Please do not use it.

Default: None

Minimum: 1

Maximum: 64

ipv6_vip_virsubnet_id String

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

This parameter is unsupported. Please do not use it.

ipv6_vip_port_id String

Specifies the ID of the port bound to the IPv6 address.

This parameter is unsupported. Please do not use it.

availability_zone_list Array of strings Specifies the list of AZs where the load balancer is created.
enterprise_project_id String

Specifies the enterprise project ID.

If this parameter is not passed during resource creation, the resource belongs to the default enterprise project.

This parameter is unsupported. Please do not use it.

Default: 0

l4_flavor_id String

Specifies the Layer-4 flavor.

Minimum: 1

Maximum: 255

l4_scale_flavor_id String

Specifies the reserved Layer 4 flavor.

Minimum: 1

Maximum: 255

l7_flavor_id String

Specifies the Layer-7 flavor.

Minimum: 1

Maximum: 255

l7_scale_flavor_id String

Specifies the reserved Layer 7 flavor.

Minimum: 1

Maximum: 255

publicips Array of PublicIpInfo <#ListLoa dBalancers__response_PublicIpInfo>__ objects Specifies the EIP bound to the load balancer.
elb_virsubnet_ids Array of strings Specifies the ID of the subnet on the downstream plane. The ports used by the load balancer dynamically occupy IP addresses in the subnet.
ip_target_enable Boolean

Specifies whether to enable cross-VPC backend.

This parameter is unsupported. Please do not use it.

Default: false

frozen_scene String

Specifies the scenario where the load balancer is frozen. Use commas to separate multiple scenarios.

If the value is ARREAR, the load balancer is frozen because your account is in arrears.

ipv6_bandwidth BandwidthRef <#ListLoa dBalancers__response_BandwidthRef>__ object

Specifies the ID of the bandwidth. This parameter is available only when you create or update a dedicated load balancer that has an IPv6 address bound.

If you use a new IPv6 address and specify a shared bandwidth, the IPv6 address will be added to the shared bandwidth.

This parameter is unsupported. Please do not use it.

Table 6 PoolRef
Parameter Type Description
id String Specifies the ID of the backend server group.
Table 7 ListenerRef
Parameter Type Description
id String Specifies the listener ID.
Table 8 Tag
Parameter Type Description
key String Specifies the tag key.
value String Specifies the tag value.
Table 9 EipInfo
Parameter Type Description
eip_id String Specifies the EIP ID.
eip_address String Specifies the specific IP address.
ip_version Integer

Specifies the IP version. 4 indicates IPv4, and 6 indicates IPv6.

IPv6 is unsupported. The value cannot be 6.

Table 10 PublicIpInfo
Parameter Type Description
publicip_id String Specifies the EIP ID.
publicip_address String Specifies the IP address.
ip_version Integer

Specifies the IP version. The value can be 4 (IPv4) or 6 (IPv6).

IPv6 is unsupported. The value cannot be 6.

Table 11 BandwidthRef
Parameter Type Description
id String Specifies the shared bandwidth ID.
Table 12 PageInfo
Parameter Type Description
previous_marker String Specifies the ID of the first record in the pagination query result. This parameter will not be returned if no query result is returned.
next_marker String Marks the start record on the next page in the pagination query result. This parameter will not be returned if there is no next page.
current_count Integer Specifies the number of records.

Example Requests

GET

https://{elb_endpoint}/v3/{project_id}/elb/loadbalancers?limit={num}&marker={loadbalancer_id}

Example Responses

Status code: 200

Successful request.

{
  "loadbalancers" : [ {
    "id" : "87627cb6-9ff1-4580-984f-cc564fa9fc34",
    "project_id" : "b2782e6708b8475c993e6064bc456bf8",
    "name" : "loadbalancer-cyf",
    "description" : "simple lb-cyf",
    "vip_port_id" : "0381c10b-4927-4fa5-a7b5-fa529c162a06",
    "vip_address" : "192.168.0.26",
    "admin_state_up" : true,
    "provisioning_status" : "ACTIVE",
    "operating_status" : "ONLINE",
    "listeners" : [ ],
    "pools" : [ ],
    "tags" : [ ],
    "provider" : "vlb",
    "created_at" : "2019-05-24T02:09:39Z",
    "updated_at" : "2019-05-24T02:09:39Z",
    "vpc_id" : "2037c5bb-e04b-4de2-9300-9051af18e417",
    "enterprise_project_id" : "0",
    "availability_zone_list" : [ "AZ1" ],
    "elb_virsubnet_ids" : [ "ad5d63bf-3b50-4e88-b4d9-e94a59aade48" ],
    "eips" : [ ],
    "guaranteed" : true,
    "l4_flavor_id" : "22365281-de68-45e4-ada4-b0920b6da3c2",
    "l7_flavor_id" : "0942eb8f-51fa-4354-87b1-bf4cfeca4823",
    "vip_subnet_cidr_id" : "1992ec06-f364-4ae3-b936-6a8cc24633b7"
  }, {
    "id" : "09e86f09-03fc-440e-8132-03f3e149e979",
    "project_id" : "b2782e6708b8475c993e6064bc456bf8",
    "name" : "loadbalancer-cyf",
    "description" : "simple lb-cyf",
    "vip_port_id" : "e0bb984a-d094-4559-9b3b-bd61b5eb3a8f",
    "vip_address" : "192.168.0.47",
    "admin_state_up" : true,
    "provisioning_status" : "ACTIVE",
    "operating_status" : "ONLINE",
    "listeners" : [ ],
    "pools" : [ ],
    "tags" : [ ],
    "provider" : "vlb",
    "created_at" : "2019-05-24T02:02:01Z",
    "updated_at" : "2019-05-24T02:02:01Z",
    "vpc_id" : "2037c5bb-e04b-4de2-9300-9051af18e417",
    "enterprise_project_id" : "0",
    "availability_zone_list" : [ "AZ1" ],
    "elb_virsubnet_ids" : [ "ad5d63bf-3b50-4e88-b4d9-e94a59aade48" ],
    "eips" : [ ],
    "guaranteed" : true,
    "vip_subnet_cidr_id" : "1992ec06-f364-4ae3-b936-6a8cc24633b7"
  } ],
  "page_info" : {
    "next_marker" : "09e86f09-03fc-440e-8132-03f3e149e979",
    "previous_marker" : "87627cb6-9ff1-4580-984f-cc564fa9fc34",
    "current_count" : 2
  },
  "request_id" : "8709f187-c879-446c-a198-8f93ede2c178"
}

Status Codes

Status Code Description
200 Successful request.

Error Codes

See Error Codes.

Parent topic: Load Balancer