DescribeLoadBalancers

Last updated: 2020-08-07 10:44:36

1. API Description

Domain name for API request: clb.tencentcloudapi.com.

This API is used to query the list of CLB instances in a region.

A maximum of 20 requests can be initiated per second for this API.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: clb.ap-shanghai-fsi.tencentcloudapi.com

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: DescribeLoadBalancers.
Version Yes String Common parameter. The value used for this API: 2018-03-17.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
LoadBalancerIds.N No Array of String CLB instance ID.
LoadBalancerType No String CLB instance network type:
OPEN: public network; INTERNAL: private network.
Forward No Integer CLB instance type. 1: generic CLB instance; 0: classic CLB instance
LoadBalancerName No String CLB instance name.
Domain No String Domain name assigned to a CLB instance by Tencent Cloud. This parameter is meaningful only for the public network classic CLB.
LoadBalancerVips.N No Array of String VIP address of a CLB instance (there can be multiple addresses)
BackendPublicIps.N No Array of String Public IP of the real server bound to a CLB.
BackendPrivateIps.N No Array of String Private IP of the real server bound to a CLB.
Offset No Integer Data offset. Default value: 0.
Limit No Integer Number of returned CLB instances. Default value: 20. Maximum value: 100.
OrderBy No String Sort by parameter. Value range: LoadBalancerName, CreateTime, Domain, LoadBalancerType.
OrderType No Integer 1: reverse; 0: sequential. Default value: reverse by creation time |
SearchKey No String Search field which fuzzy matches name, domain name, or VIP.
ProjectId No Integer ID of the project to which a CLB instance belongs, which can be obtained through the DescribeProject API.
WithRs No Integer Whether a CLB instance is bound to a real server. 0: no; 1: yes; -1: query all.
VpcId No String VPC where a CLB instance resides, such as vpc-bhqkbhdx.
Basic network does not support queries by VpcId.
SecurityGroup No String Security group ID, such as sg-m1cc9123
MasterZone No String Master AZ, such as "100001" (Guangzhou Zone 1)
Filters.N No Array of Filter Each request can have up to 10 Filters and 100 Filter.Values. Detailed filter conditions:
  • internet-charge-type - Type: String - Required: No - Filter by CLB network billing mode, including TRAFFIC_POSTPAID_BY_HOUR
  • 3. Output Parameters

    Parameter Name Type Description
    TotalCount Integer Total number of CLB instances that meet the filter criteria. This value is independent of the Limit in the input parameter.
    LoadBalancerSet Array of LoadBalancer Array of returned CLB instances.
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Querying the CLB instance with a specified private IP of the real server bound to it

    This example shows you how to query the CLB instance bound to the real server whose private IP is 172.26.0.11.

    Input Example

    https://clb.tencentcloudapi.com/?Action=DescribeLoadBalancers
    &WithRs=1
    &BackendPrivateIps.0=172.26.0.11
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "TotalCount": 2,
        "LoadBalancerSet": [
          {
            "LoadBalancerId": "lb-rbw529fz",
            "LoadBalancerName": "test_LB",
            "Forward": 1,
            "Domain": "",
            "LoadBalancerVips": [
              "129.226.78.67"
            ],
            "LoadBalancerType": "OPEN",
            "Status": 1,
            "CreateTime": "2019-07-02 18:12:52",
            "StatusTime": "2019-07-02 18:12:53",
            "ProjectId": 0,
            "OpenBgp": 0,
            "Snat": false,
            "Isolation": 0,
            "Log": "",
            "AnycastZone": "",
            "AddressIPVersion": "ipv4",
            "VpcId": "vpc-lt9uj4mo",
            "NumericalVpcId": 117008,
            "TargetRegionInfo": {
              "Region": "ap-hongkong",
              "VpcId": "vpc-lt9uj12o"
            },
            "SubnetId": "",
            "SecureGroups": [],
            "Tags": [],
            "VipIsp": "BGP",
            "MasterZone": null,
            "BackupZoneSet": null,
            "IsolatedTime": null,
            "ExpireTime": "2019-08-02 18:12:52",
            "ChargeType": "POSTPAID_BY_HOUR",
            "NetworkAttributes": {
              "InternetChargeType": "BANDWIDTH_POSTPAID_BY_HOUR",
              "InternetMaxBandwidthOut": 10
            },
            "PrepaidAttributes": null
          }
        ],
        "RequestId": "eba822a4-67cb-414c-b21d-f98ba3995d12"
      }
    }

    Example2 Fuzzy querying CLB instances by name, domain name, and VIP

    Input Example

    https://clb.tencentcloudapi.com/?Action=DescribeLoadBalancers
    &SearchKey=test_LB
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "TotalCount": 1,
        "LoadBalancerSet": [
          {
            "LoadBalancerId": "lb-rbw529fz",
            "LoadBalancerName": "test_LB",
            "Forward": 1,
            "Domain": "",
            "LoadBalancerVips": [
              "129.226.78.67"
            ],
            "LoadBalancerType": "OPEN",
            "Status": 1,
            "CreateTime": "2019-07-02 18:12:52",
            "StatusTime": "2019-07-02 18:12:53",
            "ProjectId": 0,
            "OpenBgp": 0,
            "Snat": false,
            "Isolation": 0,
            "Log": "",
            "AnycastZone": "",
            "AddressIPVersion": "ipv4",
            "VpcId": "vpc-lt9uj4mo",
            "NumericalVpcId": 117008,
            "TargetRegionInfo": {
              "Region": "ap-hongkong",
              "VpcId": "vpc-lt9uj12o"
            },
            "SubnetId": "",
            "SecureGroups": [],
            "Tags": [],
            "VipIsp": "BGP",
            "MasterZone": null,
            "BackupZoneSet": null,
            "IsolatedTime": null,
            "ExpireTime": "2019-08-02 18:12:52",
            "ChargeType": "POSTPAID_BY_HOUR",
            "NetworkAttributes": {
              "InternetChargeType": "BANDWIDTH_POSTPAID_BY_HOUR",
              "InternetMaxBandwidthOut": 10
            },
            "PrepaidAttributes": null
          }
        ],
        "RequestId": "eba822a4-67cb-414c-b21d-f98ba3995d12"
      }
    }

    Example3 Querying by CLB instance ID

    Input Example

    https://clb.tencentcloudapi.com/?Action=DescribeLoadBalancers
    &LoadBalancerIds.0=lb-rbw529fz
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "TotalCount": 1,
        "LoadBalancerSet": [
          {
            "LoadBalancerId": "lb-rbw529fz",
            "LoadBalancerName": "test_LB",
            "Forward": 1,
            "Domain": "",
            "LoadBalancerVips": [
              "129.226.78.67"
            ],
            "LoadBalancerType": "OPEN",
            "Status": 1,
            "CreateTime": "2019-07-02 18:12:52",
            "StatusTime": "2019-07-02 18:12:53",
            "ProjectId": 0,
            "OpenBgp": 0,
            "Snat": false,
            "Isolation": 0,
            "Log": "",
            "AnycastZone": "",
            "AddressIPVersion": "ipv4",
            "VpcId": "vpc-lt9uj4mo",
            "NumericalVpcId": 117008,
            "TargetRegionInfo": {
              "Region": "ap-hongkong",
              "VpcId": "vpc-lt9uj12o"
            },
            "SubnetId": "",
            "SecureGroups": [],
            "Tags": [],
            "VipIsp": "BGP",
            "MasterZone": null,
            "BackupZoneSet": null,
            "IsolatedTime": null,
            "ExpireTime": "2019-08-02 18:12:52",
            "ChargeType": "POSTPAID_BY_HOUR",
            "NetworkAttributes": {
              "InternetChargeType": "BANDWIDTH_POSTPAID_BY_HOUR",
              "InternetMaxBandwidthOut": 10
            },
            "PrepaidAttributes": null
          }
        ],
        "RequestId": "eba822a4-67cb-414c-b21d-f98ba3995d12"
      }
    }

    Example4 Querying by CLB instance type, project, name, and VIP

    Input Example

    https://clb.tencentcloudapi.com/?Action=DescribeLoadBalancers
    &LoadBalancerType=OPEN
    &ProjectId=0
    &LoadBalancerName=test_LB
    &LoadBalancerVips.0=129.226.78.67
    &<Common request parameters>

    Output Example

    {
      "Response": {
        "TotalCount": 1,
        "LoadBalancerSet": [
          {
            "LoadBalancerId": "lb-rbw529fz",
            "LoadBalancerName": "test_LB",
            "Forward": 1,
            "Domain": "",
            "LoadBalancerVips": [
              "129.226.78.67"
            ],
            "LoadBalancerType": "OPEN",
            "Status": 1,
            "CreateTime": "2019-07-02 18:12:52",
            "StatusTime": "2019-07-02 18:12:53",
            "ProjectId": 0,
            "OpenBgp": 0,
            "Snat": false,
            "Isolation": 0,
            "Log": "",
            "AnycastZone": "",
            "AddressIPVersion": "ipv4",
            "VpcId": "vpc-lt9uj4mo",
            "NumericalVpcId": 117008,
            "TargetRegionInfo": {
              "Region": "ap-hongkong",
              "VpcId": "vpc-lt9uj12o"
            },
            "SubnetId": "",
            "SecureGroups": [],
            "Tags": [],
            "VipIsp": "BGP",
            "MasterZone": null,
            "BackupZoneSet": null,
            "IsolatedTime": null,
            "ExpireTime": "2019-08-02 18:12:52",
            "ChargeType": "POSTPAID_BY_HOUR",
            "NetworkAttributes": {
              "InternetChargeType": "BANDWIDTH_POSTPAID_BY_HOUR",
              "InternetMaxBandwidthOut": 10
            },
            "PrepaidAttributes": null
          }
        ],
        "RequestId": "eba822a4-67cb-414c-b21d-f98ba3995d12"
      }
    }

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    FailedOperation Operation failed.
    InternalError Internal error.
    InvalidParameter Parameter error.
    InvalidParameter.FormatError Wrong parameter format.
    InvalidParameterValue Wrong parameter value.
    InvalidParameterValue.InvalidFilter Incorrect Filter parameter.
    InvalidParameterValue.Length Wrong parameter length.
    InvalidParameterValue.Range Wrong parameter value range.
    UnauthorizedOperation Unauthorized operation.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help