Help Center/ Cloud Search Service/ API Reference/ API V1/ Load Balancing/ Obtain information about the load balancers of a cluster.
Updated on 2025-08-15 GMT+08:00

Obtain information about the load balancers of a cluster.

Function

CSS integrates shared load balancers and allows you to bind public network access and enable the VPC Endpoint service. Dedicated load balancers provide more functions and higher performance than shared load balancers.

This API is used to obtain the ELB load balancer information of a cluster, including the server certificate name, server certificate ID, ELB switch information, load balancers, listeners, and health check results.

Calling Method

For details, see Calling APIs.

URI

GET /v1.0/{project_id}/clusters/{cluster_id}/es-listeners

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name.

Constraints:

N/A

Value range:

Project ID of the account.

Default value:

N/A

cluster_id

Yes

String

Definition:

ID of the cluster you want to query. For details about how to obtain the cluster ID, see Obtaining the Cluster ID.

Constraints:

N/A

Value range:

Cluster ID.

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

type

No

String

Definition:

Search type.

Constraints:

N/A

Value range:

  • searchTool: Query details about the load balancers of an Elasticsearch/OpenSearch cluster.

[- viewTool: Query details about the load balancers of Kibana/OpenSearch Dashboards.] (tag:white)

Default value:

searchTool

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

serverCertName

String

Definition:

Server certificate name.

Value range:

N/A

serverCertId

String

Definition:

Server certificate ID.

Value range:

N/A

cacertName

String

Definition:

The name of the CA certificate.

Value range:

N/A

cacertId

String

Definition:

ID of the CA certificate.

Value range:

N/A

elb_enable

Boolean

Definition:

Whether ELB is enabled.

Value range:

  • true: ELB is enabled.

  • false: ELB is disabled.

authentication_type

String

Definition:

Authentication mode.

Value range:

  • single: one-way authentication.

  • double: two-way authentication.

loadBalancer

LoadBalancer object

Definition:

Load balancer information.

Value range:

N/A

listener

Elbv3Listener object

Definition:

Listener object information.

Value range:

N/A

healthmonitors

Array of Member objects

Definition:

Health check result set.

Value range:

N/A

Table 4 LoadBalancer

Parameter

Type

Description

id

String

Definition:

Load balancer ID.

Value range:

N/A

name

String

Definition:

Load balancer name.

Value range:

N/A

guaranteed

String

Definition:

Whether a dedicated load balancer is used.

Value range:

  • false: The load balancer is a shared load balancer.

  • true: The load balancer is a dedicated load balancer.

billing_info

String

Definition:

Specifies the resource billing information.

Value range:

  • If the value is left blank, the resource is billed on a pay-per-use basis.

  • If the value is specified, the yearly/monthly billing mode is used.

description

String

Definition:

Description.

Value range:

N/A

vpc_id

String

Definition:

ID of the VPC to which the ELB instance belongs.

Value range:

N/A

provisioning_status

String

Definition:

Provisioning status of the load balancer

Value range:

  • ACTIVE: in use

  • PENDING_DELETE: deleting

listeners

Array of IdListWrapper objects

Definition:

Associated listener list.

Value range:

N/A

vip_address

String

Definition:

IPv4 virtual IP address bound to the load balancer.

Value range:

N/A

vip_port_id

String

Definition:

Port ID bound to the private IPv4 IP address of the load balancer.

Value range:

N/A

ipv6_vip_address

String

Definition:

IPv6 address of the load balancer.

Value range:

N/A

publicips

Array of PublicIpInfo objects

Definition:

The EIP bound to the load balancer

Value range:

N/A

Table 5 IdListWrapper

Parameter

Type

Description

id

String

Definition:

Listener ID.

Value range:

N/A

Table 6 PublicIpInfo

Parameter

Type

Description

publicip_id

String

Definition:

EIP configuration ID.

Value range:

N/A

publicip_address

String

Definition:

Specifies the EIP.

Value range:

N/A

ip_version

Integer

Definition:

IP address version.

Value range:

  • 4: IPv4.

  • 6: IPv6.

Table 7 Elbv3Listener

Parameter

Type

Description

id

String

Definition:

Listener ID.

Value range:

N/A

name

String

Definition:

Listener name.

Value range:

N/A

protocol

String

Definition:

Protocol used by the listener.

Value range:

N/A

protocol_port

Integer

Definition:

Port used by the listener.

Value range:

N/A

ipgroup

ListenerIpGroup object

Definition:

ipgroup information in the listener object.

Value range:

N/A

Table 8 ListenerIpGroup

Parameter

Type

Description

ipgroup_id

String

Definition:

ID of the access control group associated with the listener. This parameter is mandatory during creation and is optional during update.

Value range:

N/A

enable_ipgroup

Boolean

Definition:

Status of an access control group.

Value range:

  • True: Access control is enabled.

  • False: Access control is disabled.

Table 9 Member

Parameter

Type

Description

name

String

Definition:

Specifies the backend server name.

Value range:

N/A

address

String

Definition:

Specifies the IP address bound to the backend server.

Value range:

N/A

protocol_port

Integer

Definition:

Specifies the port used by the backend server.

Value range:

N/A

operating_status

String

Definition:

Specifies the operating status of the backend server.

Value range:

  • ONLINE: The backend server is running normally.

  • NO_MONITOR: No health check is configured for the backend server group to which the backend server belongs.

  • OFFLINE: The cloud server used as the backend server is stopped or does not exist.

instance_id

String

Definition:

ID of the instance used as the backend server.

Value range:

An empty value indicates that the instance associated with the member is not a real device.

Example Requests

Obtain information about the load balancers of a cluster.

GET https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/es-listeners

Example Responses

Status code: 200

Request succeeded.

{
  "loadBalancer" : {
    "id" : "5d45faad-6cb3-479b-96b8-3e2de0cc6268",
    "name" : "elb-css",
    "guaranteed" : "true",
    "description" : "",
    "listeners" : [ {
      "id" : "011d14fa-908b-4cd9-b0d6-0768ddc6cb71"
    }, {
      "id" : "04b86029-c281-4490-a3bd-5ea1266658ba"
    } ],
    "publicips" : [ {
      "publicip_id" : "f678e23c-96a5-49e8-8ea2-bd8b47d41e78",
      "publicip_address" : "100.1.1.1",
      "ip_version" : 4
    } ],
    "vpc_id" : "4f3deec3-efa8-4598-bf91-560aad1377a3",
    "provisioning_status" : "ACTIVE",
    "vip_address" : "10.0.0.1",
    "ipv6_vip_address" : "2409:27ff:2003:3e:1fd::f3"
  },
  "listener" : {
    "id" : "41ff041d-c7b9-4142-9167-fa93d54f97da",
    "name" : "css-searchServer",
    "protocol" : "HTTPS",
    "protocol_port" : 9265
  },
  "healthmonitors" : [ {
    "instance_id" : "bac86342-2222-43e6-817f-57f040a174a6",
    "name" : "",
    "address" : "10.0.0.87",
    "protocol_port" : 9200,
    "operating_status" : "ONLINE"
  }, {
    "instance_id" : "d935b82c-f94b-4ae0-9997-ddc90885d8c6",
    "name" : "",
    "address" : "10.0.0.61",
    "protocol_port" : 9200,
    "operating_status" : "ONLINE"
  } ],
  "serverCertName" : "server1",
  "serverCertId" : "82375af01c0d40f6a44c15962c570625",
  "elb_enable" : true,
  "authentication_type" : "single"
}

SDK Sample Code

The SDK sample code is as follows.

Java

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.css.v1.region.CssRegion;
import com.huaweicloud.sdk.css.v1.*;
import com.huaweicloud.sdk.css.v1.model.*;


public class ShowElbDetailSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");
        String projectId = "{project_id}";

        ICredential auth = new BasicCredentials()
                .withProjectId(projectId)
                .withAk(ak)
                .withSk(sk);

        CssClient client = CssClient.newBuilder()
                .withCredential(auth)
                .withRegion(CssRegion.valueOf("<YOUR REGION>"))
                .build();
        ShowElbDetailRequest request = new ShowElbDetailRequest();
        request.withClusterId("{cluster_id}");
        try {
            ShowElbDetailResponse response = client.showElbDetail(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}

Python

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkcss.v1.region.css_region import CssRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcss.v1 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]
    projectId = "{project_id}"

    credentials = BasicCredentials(ak, sk, projectId)

    client = CssClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(CssRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ShowElbDetailRequest()
        request.cluster_id = "{cluster_id}"
        response = client.show_elb_detail(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)

Go

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    css "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/css/v1"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/css/v1/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/css/v1/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")
    projectId := "{project_id}"

    auth := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        WithProjectId(projectId).
        Build()

    client := css.NewCssClient(
        css.CssClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ShowElbDetailRequest{}
	request.ClusterId = "{cluster_id}"
	response, err := client.ShowElbDetail(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

More

For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request.

Modify the request instead of retrying.

409

The request cannot be processed due to a conflict.

This status code indicates that the resource that the client attempts to create already exits, or the requested update failed due to a conflict.

412

The server does not meet one of the requirements that the requester puts on the request.

Error Codes

See Error Codes.