Docs
api
Load Balance(ULB)
DescribeLoadBalancers

Describe Application Load Balancer Instance - DescribeLoadBalancers

Overview

Describe the application load balancing instances under specific conditions or all application load balancing instances.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeLoadBalancers.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.Yes
TypestringThe type of load balancing instance. Limited enumeration values: "Application" / "Network", default value: "Application".No
ShowDetailbooleanWhether to get detailed information of the listener and backend service node. Default value: falseNo
LoadBalancerIds.NstringThe ID of the load balancing instance. It must be the same type of instance. If the instance ID is specified, all other filter conditions except Type will be ignored.No
VPCIdstringSpecify the VPC locationNo
SubnetIdstringSpecify the subnetNo
OffsetstringData offset, default is 0No
LimitstringData pagination value, default is 100No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
TotalCountintTotal number of load balancing instances that meet the conditionsYes
LoadBalancersarray[LoadBalancer]Load Balancing Instance InformationYes

Data Model

LoadBalancer

Field NameTypeDescription InformationRequired
VPCIdstringThe Resource ID of the VPC to which the Load Balancer instance belongsNo
SubnetIdstringThe resource ID of the subnet to which the load balancing instance belongs. The internal VIP of the load balancing instance and the source IP of the SNAT scenario are limited to this subnet; specifying the subnet does not affect the scope when adding backend service nodes, which is still the resources supported under the entire VPC.No
LoadBalancerIdstringID of the Load Balancing InstanceNo
TypestringType of load balancing instance. Limited enumeration values: Application -> Application type, Network -> Network typeNo
NamestringName of the Load Balancing InstanceNo
TagstringThe Business Group ID to which the Load Balancer instance belongsNo
RemarkstringRemarks information of the load balancing instanceNo
IPVersionstringSupported IP protocol version for Load Balancer instanceNo
IPInfosarray[IPInfo]Bound IP information. See IPInfo for specific structure.No
SnatIPsarray[string]The proxy IP of the application instance or the IP used by snat in the network FULLNAT modeNo
FirewallFirewallSetFirewall InformationNo
AccessLogConfigAccessLogConfigSet(Application-specific) Access log related configurationNo
ChargeTypestringPayment ModeNo
PurchaseValueintExpiration date (billing). Format is Unix TimestampNo
CreateTimeintLoad balancing instance creation time. The format is Unix Timestamp.No
Listenersarray[Listener]Listener Information. It is empty when ShowDetail is false.No
Statusstringlb status: Normal-Normal; Arrears-Service stopped due to overdue paymentNo
AutoRenewEnabledbooleanIs auto-renewal enabled?No

IPInfo

Field NameTypeDescription InformationRequired
IPstringIP AddressNo
IdstringUnique Identifier IDNo
IPVersionstringIP Protocol VersionNo
OperatorNamestringISP information for the public IP. Enumeration values are: Telecom -> Telecom, Unicom -> Unicom, International -> International IP, Bgp -> BGP, Duplet -> Duplet (Telecom + Unicom dual lines), BGPPro -> Premium BGP, China-mobile -> China Mobile, Anycast -> AnycastEIP.No
BandwidthTypeintBandwidth Type. Limited enumeration values: 1 -> Shared Bandwidth, 0 -> Normal Bandwidth TypeNo
BandwidthintBandwidth value. Unit MNo
AddressTypestringNetwork mode. Limited enumeration values: Internet -> Internet, Intranet -> IntranetNo

FirewallSet

Field NameTypeDescription InformationRequired
FirewallNamestringFirewall NameNo
FirewallIdstringFirewall IDNo

AccessLogConfigSet

Field NameTypeDescription InformationRequired
Enabledboolean(Application-specific) Is the access log recording function enabled?No
US3BucketNamestring(Application-specific) Bucket for storing access logsNo
US3TokenIdstring(Application-specific) Token required to upload access logs to the bucketNo

Listener

Field NameTypeDescription InformationRequired
ListenerIdstringListener's IDNo
NamestringName of the ListenerNo
RemarkstringRemarks on the ListenerNo
ListenerPortintListener's Listening PortNo
ListenerProtocolstringMonitoring Protocol. Application-specific limited values: HTTP, HTTPS.No
Certificatesarray[Certificate](Application-specific) Default server certificate ID. Only HTTPS listening is supported. For specific interface details, see Certificate.No
SecurityPolicyIdstring(Application-specific) Security policy group ID. Only HTTPS listening supports binding; Default -> Native policyNo
IdleTimeoutintConnection idle timeout. Unit: seconds.No
SchedulerstringLoad Balancing Algorithm. Application-specific limited values: Roundrobin -> Round Robin; Source -> Source Address; WeightRoundrobin -> Weighted Round Robin; Leastconn -> Least Connections; Backup -> Master-Slave ModeNo
StickinessConfigStickinessConfigSetConfiguration related to session persistence. For detailed structure, see StickinessConfigSet.No
HealthCheckConfigHealthCheckConfigSetConfiguration related to Health Check. For specific structure, see HealthCheckConfigSet.No
CompressionEnabledboolean(Application-specific) Whether to enable data compression function. Currently, only gzip is supported to compress specific file types.No
HTTP2Enabledboolean(Application-specific) Whether to enable the HTTP/2 feature. Only HTTPS listening supports enabling.No
RedirectEnabledboolean(Application-specific) Whether to enable HTTP redirection to HTTPS. Only HTTP listening supports enabling.No
RedirectPortint(Application-specific) Redirect PortNo
Targetsarray[Target]Information of the added service node. See Target for specific structure.No
Rulesarray[Rule](Application-specific) Forwarding Rule InformationNo
StatestringListener health status. Limited enumeration values: Healthy -> Healthy, Unhealthy -> Unhealthy, PartialHealth -> Partially Healthy, None -> No node status.No

Certificate

Field NameTypeDescription InformationRequired
SSLIdstringCertificate IDNo
IsDefaultbooleanIs it the default certificate?No

StickinessConfigSet

Field NameTypeDescription InformationRequired
EnabledbooleanWhether to enable the session persistence feature. The application load balancing instance is implemented based on Cookie.No
Typestring(Application-specific) Cookie processing method. Limited enumeration values: ServerInsert -> Automatically generate KEY; UserDefined -> User-defined KEY.No
CookieNamestring(Application-specific) Custom Cookie. Effective when the StickinessType value is "UserDefined"."""
No

HealthCheckConfigSet

Field NameTypeDescription InformationRequired
EnabledbooleanWhether to enable the health check function. Temporarily does not support closing. The default value is: trueNo
TypestringHealth check method. Application type limited values: Port -> Port check; HTTP -> HTTP check; Default value: PortNo
Domainstring(Application-specific) HTTP check domain. This field is meaningful when Type is HTTP, representing the HTTP check domain.No
Pathstring(Application-specific) HTTP check path. This field is meaningful when the Type is HTTP, representing the HTTP check path.No

Target

Field NameTypeDescription InformationRequired
ResourceTypestringThe type of service node. Limited enumeration values: UHost -> Cloud Host, UNI -> Virtual Network Interface, UPM -> Physical Cloud Host, IP -> IP type; Default value: "UHost"; For non-IP types, if the resource has multiple IPs, only the main IP can be added; For non-IP types, related resource information will be displayed during the display, and only IP information will be displayed for IP types. When the related resource is deleted, the non-IP type will remove the related resource from lb, and the IP type does not guarantee this logic.No
ResourceIdstringResource ID of the service nodeNo
ResourceNamestringResource Name of Service NodeNo
VPCIdstringService node's VPC resource IDNo
SubnetIdstringSubnet resource ID of the service nodeNo
ResourceIPstringIP of the service nodeNo
PortintPort of the service nodeNo
WeightintWeight of the service node. Only effective when the weighted round-robin algorithm is used.No
EnabledbooleanIs the service node enabled?No
IsBackupbooleanIs the service node a backup node?No
IdstringThe identification ID of the service node. Used in ALB/NLB, unrelated to the resource's own ID, can be used for UpdateTargetsAttribute/RemoveTargets.No
StatestringHealth check status of the service node. Limited enumeration values: Healthy -> Healthy, Unhealthy -> UnhealthyNo

Rule

Field NameTypeDescription InformationRequired
RuleIdstringID of the forwarding ruleNo
RuleConditionsarray[RuleCondition]Forwarding rule matching conditions. See RuleCondition for specific structure.No
RuleActionsarray[RuleAction]Forwarding action. For specific rules, see RuleAction.No
IsDefaultbooleanIs it the default forwarding rule?No
PassbooleanWhen the service node for forwarding is empty, should the rule be ignored?No

RuleCondition

Field NameTypeDescription InformationRequired
TypestringMatch condition type. Limited enumeration values: Host, PathYes
HostConfigHostConfigSetDomain-related configuration. Required when Type is Host. See HostConfigSet for specific structure.No
PathConfigPathConfigSetConfiguration related to the path. Required when Type is Path. For detailed structure, see PathConfigSet.No

RuleAction

Field NameTypeDescription InformationRequired
TypestringAction Type. Limited enumeration value: ForwardYes
ForwardConfigForwardConfigSetForward service node related configuration. See ForwardConfigSet for specific structure.No

ForwardConfigSet

Field NameTypeDescription InformationRequired
Targetsarray[ForwardTargetSet]The backend service nodes to be forwarded. It is limited to the service node pool of the listener; the array length can be 0. See ForwardTargetSet for detailed structure.Yes

ForwardTargetSet

Field NameTypeDescription InformationRequired
IdstringIdentification ID of the service nodeYes
WeightintWeight. Only valid when the load balancing algorithm of the listener is weighted round robin; Value range [1-100], default value is 1.No

HostConfigSet

Field NameTypeDescription InformationRequired
Valuesarray[string]Value. Currently only supports an array length of 1; The value must meet the conditions of the relevant matching method.Yes
MatchModestringMatching method. Limited enumeration values: Regular-Regular, Wildcard-Wildcard domain; Default value: Regular.No

PathConfigSet

Field NameTypeDescription InformationRequired
Valuesarray[string]Value. Currently only supports an array length of 1; The value must meet the conditions of the relevant matching method.Yes

Example

Request Example

https://api.ucloud-global.com/?Action=DescribeLoadBalancers
&Region=cn-zj
&ProjectId=JudspFLn
&Type=SOkhvXqs
&ShowDetail=true
&LoadBalancerIds.n=afLPbbUk
&VPCId=PAOnGlHw
&SubnetId=vGOOxBXC
&Offset=RAhcXWvm
&Limit=bWHnGTJZ

Response Example

{
  "Action": "DescribeLoadBalancersResponse",
  "LoadBalancers": [
    {
      "AccessLogConfig": {},
      "AutoRenewEnabled": false,
      "ChargeType": "Year",
      "CreateTime": 6,
      "Firewall": {},
      "IPInfos": [
        {
          "AddressType": "jlYUlHmb",
          "Bandwidth": 5,
          "BandwidthType": 3,
          "IP": "sYqnEKjJ",
          "IPVersion": "LDatfpFC",
          "Id": "jSOsaGMM",
          "OperatorName": "ahbfYzEp"
        }
      ],
      "IPVersion": "JXcGJbre",
      "Listeners": [
        {
          "Certificates": [
            {
              "IsDefault": true,
              "SSLId": "nrbmESZz"
            }
          ],
          "CompressionEnabled": false,
          "HTTP2Enabled": true,
          "HealthCheckConfig": [
            {
              "Domain": "mZUYcJEA",
              "Enabled": true,
              "Path": "buktmDFo",
              "Type": "nQpafhEu"
            }
          ],
          "IdleTimeout": 2,
          "ListenerId": "FAJsODnt",
          "ListenerPort": "OMuuyqzK",
          "ListenerProtocol": "dJaCaOUB",
          "Name": "nzIUoMAB",
          "RedirectEnabled": true,
          "RedirectPort": 5,
          "Remark": "uDpZOaVd",
          "Rules": [
            {
              "IsDefault": false,
              "Pass": false,
              "RuleActions": [
                {
                  "ForwardConfig": {},
                  "Type": "lyzbagkX"
                }
              ],
              "RuleConditions": [
                {
                  "HostConfig": {},
                  "PathConfig": {},
                  "Type": "cn-zj"
                }
              ],
              "RuleId": "nbeKETIq"
            }
          ],
          "Scheduler": "clvMmLsq",
          "SecurityPolicyId": "BntdiFQb",
          "State": "dBLCxkUb",
          "StickinessConfig": [
            {
              "CookieName": "QqYEDqqN",
              "Enabled": true,
              "Type": "DHUPMaKq"
            }
          ],
          "Targets": [
            {
              "Enabled": true,
              "Id": "EUPXNKYT",
              "IsBackup": false,
              "Port": 5,
              "ResourceIP": "zwcZamJW",
              "ResourceId": "EdeVFIPM",
              "ResourceName": "fEkEJghF",
              "ResourceType": "pLBCKTlW",
              "State": "xJfoZnuJ",
              "SubnetId": "mdWyqxkv",
              "VPCId": "QhoMgzqN",
              "Weight": 3
            }
          ]
        }
      ],
      "LoadBalancerId": "CXzNTkEm",
      "Name": "KqNCwTFr",
      "PurchaseValue": 1,
      "Remark": "CpqfGzsA",
      "SnatIPs": [
        "tIFkRvJE"
      ],
      "Status": "aTjJABaa",
      "SubnetId": "QxYdgOxo",
      "Tag": "SOslauUt",
      "Type": "bLJfPWGP",
      "VPCId": "UsaZfFXq"
    }
  ],
  "RetCode": 0,
  "TotalCount": 1
}