tencent cloud

APIs

DescribeLoadBalancers

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-06-17 17:21:40

1. API Description

Domain name for API request: clb.intl.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.

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 Params. The value used for this API: DescribeLoadBalancers.
Version Yes String Common Params. The value used for this API: 2023-04-17.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
LoadBalancerIds.N No Array of String CLB instance ID. There can be up to 20 IDs.
LoadBalancerType No String Network type of the CLB instance:
OPEN: Public network attribute. INTERNAL: Private network attribute.
Forward No Integer CLB instance type. 1: General CLB instance; 0: Classic CLB instance. If this parameter is not specified, all types of CLB instances will be queried.
LoadBalancerName No String CLB instance name.
Domain No String Domain name assigned for a CLB instance by the cloud platform.
LoadBalancerVips.N No Array of String VIP address of a CLB instance (there can be multiple addresses).
BackendPublicIps.N No Array of String The public network IP of the backend service bound to Cloud Load Balancer (CLB) only supports querying the public IP of Cloud Virtual Machine (CVM).
BackendPrivateIps.N No Array of String The private network IP of the backend service bound to Cloud Load Balancer (CLB) only supports querying the private IP address of Cloud Virtual Machine (CVM).
Offset No Integer Data offset. Default: 0.
Limit No Integer Number of CLB instances returned. Default: 20. Maximum: 100.
OrderBy No String A sorting parameter. Valid values: LoadBalancerName, CreateTime, Domain, and LoadBalancerType.
OrderType No Integer 1: Reverse; 0: Sequential. Default: reverse by creation time
SearchKey No String Search field, supporting fuzzy match by name, domain, and VIP.
ProjectId No Integer The ID of the project to which the CLB instance belongs. This parameter can be obtained through the DescribeProject API.
WithRs No Integer Whether CLB is bound to a real server. 0: No; 1: Yes; -1: Query all.
VpcId No String Unique VPC ID of the CLB instance, such as vpc-bhqkbhdx
Basic network allows input '0'.
SecurityGroup No String Security group ID, for example sg-m1cc****.
MasterZone No String Primary availability zone ID, such as 100001 (corresponding to Guangzhou Zone 1). You can obtain the list of availability zones through DescribeZones.
Filters.N No Array of Filter Each request can have up to 10 Filters values and 100 Filter.Values values.
Filter.Name and Filter.Values are required items. The detailed filter criteria are as follows:
  • charge-type - String - Required: No - (Filter condition) Filter by the CLB instance billing mode, including "PREPAID", "POSTPAID_BY_HOUR".
  • internet-charge-type - String - Required: No - (Filter condition) Filter by CLB network billing mode, including "BANDWIDTH_PREPAID", "TRAFFIC_POSTPAID_BY_HOUR", "BANDWIDTH_POSTPAID_BY_HOUR", "BANDWIDTH_PACKAGE".
  • master-zone-id - String - Required: No - (Filter condition) Filter by primary AZ ID of CLB, such as "100001" (corresponding to Guangzhou Zone 1).
  • tag-key - String - required: no - (filter condition) filter by CLB tag key.
  • tag:tag-key - String - Required: no - (Filter condition) Filter by CLB Tag key-value pair. Replace tag-key with a specific tag key.
  • function-name - String - Required: No - (Filter condition) Filter by the function name of the Serverless Cloud Function (SCF) bound to the CLB backend.
  • vip-isp - String - Required: No - (Filter condition) Filter by operator type of CLB VIP, such as "BGP", "INTERNAL", "CMCC", "CTCC", "CUCC".
  • sla-type - String - required: no - (filter condition) filter by CLB performance capacity specification, including "clb.c2.medium", "clb.c3.small", "clb.c3.medium", "clb.c4.small", "clb.c4.medium", "clb.c4.large", "clb.c4.xlarge".
  • AdditionalFields.N No Array of String Select the expansion fields to return. If not specified, expansion fields are not returned by default. The supported expansion fields are as follows:
  • TargetCount: Number of real servers bound to it
  • 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 parameters.
    LoadBalancerSet Array of LoadBalancer Returned CLB instance array.
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Querying CLB Instances by Instance ID

    Querying CLB Instances by Instance ID

    Input Example

    POST / HTTP/1.1
    Host: clb.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeLoadBalancers
    <Common request parameters>
    
    {
        "LoadBalancerIds": [
            "lb-rbw5****"
        ]
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "LoadBalancerSet": [
                {
                    "LoadBalancerId": "lb-rbw5****",
                    "LoadBalancerName": "test_LB_****",
                    "Forward": 1,
                    "Domain": "",
                    "LoadBalancerDomain": "",
                    "LoadBalancerVips": [
                        "119.***.***.51"
                    ],
                    "AddressIPv6": null,
                    "AddressIPVersion": "ipv4",
                    "IPv6Mode": null,
                    "LoadBalancerType": "OPEN",
                    "Status": 1,
                    "CreateTime": "2023-12-27 15:53:46",
                    "StatusTime": "2024-01-22 19:58:03",
                    "ProjectId": 0,
                    "OpenBgp": 0,
                    "Snat": false,
                    "Isolation": 0,
                    "Log": "",
                    "AnycastZone": "",
                    "VpcId": "vpc-1y****83",
                    "NumericalVpcId": 1111113,
                    "TargetRegionInfo": {
                        "Region": "ap-guangzhou",
                        "VpcId": "vpc-1y****83",
                        "NumericalVpcId": 1111113
                    },
                    "SubnetId": "",
                    "SecureGroups": [],
                    "Tags": [
                        {
                            "TagKey": "key-****",
                            "TagValue": "value-****"
                        }
                    ],
                    "MasterZone": {
                        "ZoneId": 100003,
                        "Zone": "ap-guangzhou-3",
                        "ZoneName": "Guangzhou Zone 3",
                        "ZoneRegion": "ap-guangzhou",
                        "LocalZone": false,
                        "EdgeZone": false
                    },
                    "BackupZoneSet": null,
                    "IsolatedTime": null,
                    "ExpireTime": "2024-01-27 15:53:46",
                    "ChargeType": "POSTPAID_BY_HOUR",
                    "NetworkAttributes": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 5,
                        "BandwidthPackageSubType": "BGP"
                    },
                    "PrepaidAttributes": null,
                    "ExtraInfo": null,
                    "LogSetId": "",
                    "LogTopicId": "",
                    "LoadBalancerPassToTarget": false,
                    "IsDDos": false,
                    "ConfigId": "",
                    "ExclusiveCluster": {
                        "L4Clusters": null,
                        "L7Clusters": null,
                        "ClassicalCluster": null
                    },
                    "SnatPro": false,
                    "SnatIps": [],
                    "IsBlock": false,
                    "IsBlockTime": "",
                    "SlaType": "",
                    "ClusterTag": null,
                    "LocalBgp": false,
                    "MixIpTarget": false,
                    "Zones": null,
                    "NfvInfo": "",
                    "HealthLogSetId": "",
                    "HealthLogTopicId": "",
                    "ClusterIds": null,
                    "Egress": "center_egress1",
                    "AttributeFlags": [
                        "SharedLimitFlag"
                    ],
                    "VipIsp": "BGP"
                }
            ],
            "RequestId": "b0e9e810-01cc-4c12-8bd2-ca0a2ab1b976"
        }
    }
    

    Example2 Querying CLB Instances by Tag Key-Value Pair

    Querying CLB Instances by Tag Key-Value Pair

    Input Example

    POST / HTTP/1.1
    Host: clb.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeLoadBalancers
    <Common request parameters>
    
    {
        "ProjectId": "0",
        "LoadBalancerType": "OPEN",
        "Filters": [
            {
                "Values": [
                    "test_tag_value2",
                    "test_tag_value1"
                ],
                "Name": "tag:test_tag_key"
            }
        ],
        "LoadBalancerName": "test_LB"
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "LoadBalancerSet": [
                {
                    "LoadBalancerId": "lb-rbw5****",
                    "LoadBalancerName": "test_LB_****",
                    "Forward": 1,
                    "Domain": "",
                    "LoadBalancerDomain": "",
                    "LoadBalancerVips": [
                        "119.***.***.51"
                    ],
                    "AddressIPv6": null,
                    "AddressIPVersion": "ipv4",
                    "IPv6Mode": null,
                    "LoadBalancerType": "OPEN",
                    "Status": 1,
                    "CreateTime": "2023-12-27 15:53:46",
                    "StatusTime": "2024-01-22 19:58:03",
                    "ProjectId": 0,
                    "OpenBgp": 0,
                    "Snat": false,
                    "Isolation": 0,
                    "Log": "",
                    "AnycastZone": "",
                    "VpcId": "vpc-1y****83",
                    "NumericalVpcId": 1111113,
                    "TargetRegionInfo": {
                        "Region": "ap-guangzhou",
                        "VpcId": "vpc-1y****83",
                        "NumericalVpcId": 1111113
                    },
                    "SubnetId": "",
                    "SecureGroups": [],
                    "Tags": [
                        {
                            "TagKey": "key-****",
                            "TagValue": "value-****"
                        }
                    ],
                    "MasterZone": {
                        "ZoneId": 100003,
                        "Zone": "ap-guangzhou-3",
                        "ZoneName": "Guangzhou Zone 3",
                        "ZoneRegion": "ap-guangzhou",
                        "LocalZone": false,
                        "EdgeZone": false
                    },
                    "BackupZoneSet": null,
                    "IsolatedTime": null,
                    "ExpireTime": "2024-01-27 15:53:46",
                    "ChargeType": "POSTPAID_BY_HOUR",
                    "NetworkAttributes": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 5,
                        "BandwidthPackageSubType": "BGP"
                    },
                    "PrepaidAttributes": null,
                    "ExtraInfo": null,
                    "LogSetId": "",
                    "LogTopicId": "",
                    "LoadBalancerPassToTarget": false,
                    "IsDDos": false,
                    "ConfigId": "",
                    "ExclusiveCluster": {
                        "L4Clusters": null,
                        "L7Clusters": null,
                        "ClassicalCluster": null
                    },
                    "SnatPro": false,
                    "SnatIps": [],
                    "IsBlock": false,
                    "IsBlockTime": "",
                    "SlaType": "",
                    "ClusterTag": null,
                    "LocalBgp": false,
                    "MixIpTarget": false,
                    "Zones": null,
                    "NfvInfo": "",
                    "HealthLogSetId": "",
                    "HealthLogTopicId": "",
                    "ClusterIds": null,
                    "AttributeFlags": [
                        "SharedLimitFlag"
                    ],
                    "VipIsp": "BGP",
                    "Egress": "center_egress1"
                }
            ],
            "RequestId": "b0e9e810-01cc-4c12-8bd2-ca0a2ab1b976"
        }
    }
    

    Example3 Querying CLB Instances Bound to the Real Server with the Specified Private IP Address

    This example shows you how to query CLB instances bound to the real server with the private IP address 172.26.0.11.

    Input Example

    POST / HTTP/1.1
    Host: clb.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeLoadBalancers
    <Common request parameters>
    
    {
        "BackendPrivateIps": [
            "172.26.0.11"
        ],
        "WithRs": 1
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "LoadBalancerSet": [
                {
                    "LoadBalancerId": "lb-9vpm****",
                    "LoadBalancerName": "lb-test-****-1227",
                    "Forward": 1,
                    "Domain": "",
                    "LoadBalancerDomain": "",
                    "LoadBalancerVips": [
                        "119.***.***.51"
                    ],
                    "AddressIPv6": null,
                    "AddressIPVersion": "ipv4",
                    "IPv6Mode": null,
                    "LoadBalancerType": "OPEN",
                    "Status": 1,
                    "CreateTime": "2023-12-27 15:53:46",
                    "StatusTime": "2024-01-22 19:58:03",
                    "ProjectId": 0,
                    "OpenBgp": 0,
                    "Snat": false,
                    "Isolation": 0,
                    "Log": "",
                    "AnycastZone": "",
                    "VpcId": "vpc-1y****83",
                    "NumericalVpcId": 1111113,
                    "TargetRegionInfo": {
                        "Region": "ap-guangzhou",
                        "VpcId": "vpc-1y****83",
                        "NumericalVpcId": 1111113
                    },
                    "SubnetId": "",
                    "SecureGroups": [],
                    "Tags": [
                        {
                            "TagKey": "key-****",
                            "TagValue": "value-****"
                        }
                    ],
                    "MasterZone": {
                        "ZoneId": 100003,
                        "Zone": "ap-guangzhou-3",
                        "ZoneName": "Guangzhou Zone 3",
                        "ZoneRegion": "ap-guangzhou",
                        "LocalZone": false,
                        "EdgeZone": false
                    },
                    "BackupZoneSet": null,
                    "IsolatedTime": null,
                    "ExpireTime": "2024-01-27 15:53:46",
                    "ChargeType": "POSTPAID_BY_HOUR",
                    "NetworkAttributes": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 5,
                        "BandwidthPackageSubType": "BGP"
                    },
                    "PrepaidAttributes": null,
                    "ExtraInfo": null,
                    "LogSetId": "",
                    "LogTopicId": "",
                    "LoadBalancerPassToTarget": false,
                    "IsDDos": false,
                    "ConfigId": "",
                    "ExclusiveCluster": {
                        "L4Clusters": null,
                        "L7Clusters": null,
                        "ClassicalCluster": null
                    },
                    "SnatPro": false,
                    "SnatIps": [],
                    "IsBlock": false,
                    "IsBlockTime": "",
                    "SlaType": "",
                    "ClusterTag": null,
                    "LocalBgp": false,
                    "MixIpTarget": false,
                    "Zones": null,
                    "NfvInfo": "",
                    "HealthLogSetId": "",
                    "HealthLogTopicId": "",
                    "ClusterIds": null,
                    "AttributeFlags": [
                        "SharedLimitFlag"
                    ],
                    "VipIsp": "BGP",
                    "Egress": "center_egress1"
                }
            ],
            "RequestId": "b0e9e810-01cc-4c12-8bd2-ca0a2ab1b976"
        }
    }
    

    Example4 Fuzzy Querying CLB Instances by Instance Name, Domain Name, and VIP

    Fuzzy Querying CLB Instances by Instance Name, Domain Name, and VIP

    Input Example

    POST / HTTP/1.1
    Host: clb.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeLoadBalancers
    <Common request parameters>
    
    {
        "SearchKey": "test_LB"
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "LoadBalancerSet": [
                {
                    "LoadBalancerId": "lb-9vpm****",
                    "LoadBalancerName": "test_LB_****",
                    "Forward": 1,
                    "Domain": "",
                    "LoadBalancerDomain": "",
                    "LoadBalancerVips": [
                        "119.***.***.51"
                    ],
                    "AddressIPv6": null,
                    "AddressIPVersion": "ipv4",
                    "IPv6Mode": null,
                    "LoadBalancerType": "OPEN",
                    "Status": 1,
                    "CreateTime": "2023-12-27 15:53:46",
                    "StatusTime": "2024-01-22 19:58:03",
                    "ProjectId": 0,
                    "OpenBgp": 0,
                    "Snat": false,
                    "Isolation": 0,
                    "Log": "",
                    "AnycastZone": "",
                    "VpcId": "vpc-1y****83",
                    "NumericalVpcId": 1111113,
                    "TargetRegionInfo": {
                        "Region": "ap-guangzhou",
                        "VpcId": "vpc-1y****83",
                        "NumericalVpcId": 1111113
                    },
                    "SubnetId": "",
                    "SecureGroups": [],
                    "Tags": [
                        {
                            "TagKey": "key-****",
                            "TagValue": "value-****"
                        }
                    ],
                    "MasterZone": {
                        "ZoneId": 100003,
                        "Zone": "ap-guangzhou-3",
                        "ZoneName": "Guangzhou Zone 3",
                        "ZoneRegion": "ap-guangzhou",
                        "LocalZone": false,
                        "EdgeZone": false
                    },
                    "BackupZoneSet": null,
                    "IsolatedTime": null,
                    "ExpireTime": "2024-01-27 15:53:46",
                    "ChargeType": "POSTPAID_BY_HOUR",
                    "NetworkAttributes": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 5,
                        "BandwidthPackageSubType": "BGP"
                    },
                    "PrepaidAttributes": null,
                    "ExtraInfo": null,
                    "LogSetId": "",
                    "LogTopicId": "",
                    "LoadBalancerPassToTarget": false,
                    "IsDDos": false,
                    "ConfigId": "",
                    "ExclusiveCluster": {
                        "L4Clusters": null,
                        "L7Clusters": null,
                        "ClassicalCluster": null
                    },
                    "SnatPro": false,
                    "SnatIps": [],
                    "IsBlock": false,
                    "IsBlockTime": "",
                    "SlaType": "",
                    "ClusterTag": null,
                    "LocalBgp": false,
                    "MixIpTarget": false,
                    "Zones": null,
                    "NfvInfo": "",
                    "HealthLogSetId": "",
                    "HealthLogTopicId": "",
                    "ClusterIds": null,
                    "AttributeFlags": [
                        "SharedLimitFlag"
                    ],
                    "VipIsp": "BGP",
                    "Egress": "center_egress1"
                }
            ],
            "RequestId": "b0e9e810-01cc-4c12-8bd2-ca0a2ab1b976"
        }
    }
    

    Example5 Querying CLB Instances by Instance Type, Project, Name, and VIP

    Querying CLB Instances by Instance Type, Project, Name, and VIP

    Input Example

    POST / HTTP/1.1
    Host: clb.intl.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeLoadBalancers
    <Common request parameters>
    
    {
        "ProjectId": "0",
        "LoadBalancerType": "OPEN",
        "LoadBalancerVips": [
            "119.***.***.51"
        ],
        "LoadBalancerName": "test_LB"
    }
    

    Output Example

    {
        "Response": {
            "TotalCount": 1,
            "LoadBalancerSet": [
                {
                    "LoadBalancerId": "lb-rbw5****",
                    "LoadBalancerName": "test_LB_****",
                    "Forward": 1,
                    "Domain": "",
                    "LoadBalancerDomain": "",
                    "LoadBalancerVips": [
                        "119.***.***.51"
                    ],
                    "AddressIPv6": null,
                    "AddressIPVersion": "ipv4",
                    "IPv6Mode": null,
                    "LoadBalancerType": "OPEN",
                    "Status": 1,
                    "CreateTime": "2023-12-27 15:53:46",
                    "StatusTime": "2024-01-22 19:58:03",
                    "ProjectId": 0,
                    "OpenBgp": 0,
                    "Snat": false,
                    "Isolation": 0,
                    "Log": "",
                    "AnycastZone": "",
                    "VpcId": "vpc-1y****83",
                    "NumericalVpcId": 1111113,
                    "TargetRegionInfo": {
                        "Region": "ap-guangzhou",
                        "VpcId": "vpc-1y****83",
                        "NumericalVpcId": 1111113
                    },
                    "SubnetId": "",
                    "SecureGroups": [],
                    "Tags": [
                        {
                            "TagKey": "key-****",
                            "TagValue": "value-****"
                        }
                    ],
                    "MasterZone": {
                        "ZoneId": 100003,
                        "Zone": "ap-guangzhou-3",
                        "ZoneName": "Guangzhou Zone 3",
                        "ZoneRegion": "ap-guangzhou",
                        "LocalZone": false,
                        "EdgeZone": false
                    },
                    "BackupZoneSet": null,
                    "IsolatedTime": null,
                    "ExpireTime": "2024-01-27 15:53:46",
                    "ChargeType": "POSTPAID_BY_HOUR",
                    "NetworkAttributes": {
                        "InternetChargeType": "TRAFFIC_POSTPAID_BY_HOUR",
                        "InternetMaxBandwidthOut": 5,
                        "BandwidthPackageSubType": "BGP"
                    },
                    "PrepaidAttributes": null,
                    "ExtraInfo": null,
                    "LogSetId": "",
                    "LogTopicId": "",
                    "LoadBalancerPassToTarget": false,
                    "IsDDos": false,
                    "ConfigId": "",
                    "ExclusiveCluster": {
                        "L4Clusters": null,
                        "L7Clusters": null,
                        "ClassicalCluster": null
                    },
                    "SnatPro": false,
                    "SnatIps": [],
                    "IsBlock": false,
                    "IsBlockTime": "",
                    "SlaType": "",
                    "ClusterTag": null,
                    "LocalBgp": false,
                    "MixIpTarget": false,
                    "Zones": null,
                    "NfvInfo": "",
                    "HealthLogSetId": "",
                    "HealthLogTopicId": "",
                    "ClusterIds": null,
                    "AttributeFlags": [
                        "SharedLimitFlag"
                    ],
                    "VipIsp": "BGP",
                    "Egress": "center_egress1"
                }
            ],
            "RequestId": "b0e9e810-01cc-4c12-8bd2-ca0a2ab1b976"
        }
    }
    

    5. Developer Resources

    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 Incorrect parameter format.
    InvalidParameter.RegionNotFound Invalid region.
    InvalidParameterValue Parameter value error.
    InvalidParameterValue.InvalidFilter Filter parameter input error.
    InvalidParameterValue.Length Invalid parameter length.
    InvalidParameterValue.Range Invalid parameter value range.
    UnauthorizedOperation Unauthorized operation.
    UnsupportedOperation The operation is not supported.

    ヘルプとサポート

    この記事はお役に立ちましたか?

    フィードバック