All Products
Search
Document Center

Edge Security Acceleration:ListLoadBalancers

Last Updated:Nov 15, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Query the list of load balancers

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
esa:ListLoadBalancerslist
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The page number for paginated queries.

2
PageSizeintegerNo

The page size for paginated queries, with a value range of 1-500.

20
NamestringNo

The name of the load balancer, which can be used to query by name.

lb.example.com
MatchTypestringNo

The name matching strategy when querying by name:

  • fuzzy: Fuzzy match;
  • exact: Exact match, equivalent to an equality query.
fuzzy
OrderBystringNo

The sorting field. Currently, only sorting by id is supported. 'id' indicates ascending order by id, and '-id' indicates descending order by id. The id size is positively correlated with the creation time. If not provided, it defaults to descending order by id.

id
SiteIdlongYes

The site ID, which can be obtained by calling the ListSites API.

21655860979****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

CB1A380B-09F0-41BB-A198-72F8FD6DA2FE
LoadBalancersarray<object>

An array format that returns the list of load balancers.

LoadBalancerobject

Detailed information about the load balancer.

Idlong

The unique identifier ID of the load balancer.

998676487607104
Namestring

The name of the load balancer.

lb.example.com
SiteIdlong

The site ID to which the load balancer belongs.

1159101787****
Enabledboolean

Whether the load balancer is enabled.

  • true: Enabled.
  • false: Not enabled.
false
Ttlinteger

The TTL value, which is the DNS record's time to live, with a default value of 30.

30
SessionAffinitystring

Session persistence, with possible values:

  • off: Not enabled.
  • ip: Session persistence by IP.
  • cookie: Session persistence by cookie.
ip
FallbackPoollong

The fallback pool ID, to which traffic will be redirected if all other pools are unavailable.

96228666776****
SteeringPolicystring

The load balancing policy.

order
Descriptionstring

The description of the load balancer.

test
AdaptiveRoutingobject

Cross-pool failover configuration.

FailoverAcrossPoolsboolean

Whether to fail over across pools.

  • true: Yes.
  • false: No.
true
DefaultPoolsarray

List of default address pool IDs.

DefaultPoollong

Default pools.

96228666776****
RandomSteeringobject

Weighted round-robin configuration, used to control the traffic distribution weights among different pools.

DefaultWeightinteger

Weight configuration for each backend server pool, where the key is the pool ID and the value is the weight coefficient. The weight coefficient represents the proportion of relative traffic distribution.

50
PoolWeightsobject

Weight configuration for each backend server pool, where the key is the pool ID and the value is the weight coefficient.

integer

The weight value, a number between 0-100, where 0 indicates no traffic should be directed to that origin server.

50
Rulesarray<object>

List of rule configurations, used to define behaviors under specific conditions.

Ruleobject

Rule configuration within the rule set.

FixedResponseobject

Executes a specified response after matching the rule.

ContentTypestring

The Content-Type field in the HTTP Header.

application/json
Locationstring

The location field in the HTTP response.

http://www.example.com/index.html
MessageBodystring

The response body value.

Hello World.
StatusCodeinteger

Status code.

200
Overridesany

Modifies the corresponding load balancer configuration after matching the rule. The fields in this configuration will override the corresponding fields in the load balancer configuration.

{ "adaptive_routing": { "failover_across_pools": true }, "sub_region_pools": { "GB": [ 96228666776**** ], "US": [ 96228666776**** ] }, "default_pools": [ 96228666776****, 96228666776**** ], "fallback_pool": 96228666776****, "location_strategy": { "mode": "resolver_ip", "prefer_ecs": "always" }, "random_steering": { "default_weight": 30, "pool_weights": { "96228666776****": 70, "96228666776****": 80 } }, "region_pools": { "ENAM": [ 96228666776****, 92843536908**** ], "WNAM": [ 92843536908**** ] }, "session_affinity": "cookie", "session_affinity_attributes": { "drain_duration": 100, "headers": ["none"], "require_all_headers": false, "samesite": "Auto", "secure": "Auto", "zero_downtime_failover": "sticky" }, "session_affinity_ttl": 1800, "steering_policy": "dynamic_latency", "ttl": 30 }
Rulestring

Rule content, using conditional expressions to match user requests. This parameter is not required when adding global configurations. There are two usage scenarios:

  • Match all incoming requests: set the value to true
  • Match specific requests: set the value to a custom expression, for example: (http.host eq "video.example.com")
http.request.uri.path contains "/testing"
RuleNamestring

The name of the rule. This parameter is not required when adding a global configuration.

r2
RuleEnablestring

The switch for the rule. This parameter is not required when adding a global configuration. Possible values:

  • on: Enabled.
  • off: Disabled.
on
Sequenceinteger

The execution order of the rule. The higher the value, the higher the priority.

1
Terminatesboolean

Whether to terminate the execution of subsequent rules.

  • true: Yes.
  • false: No, which is the default value.
true
Monitorobject

Monitor configuration.

Typestring

The type of monitor protocol, such as HTTP, used for health checks. When the value is off, it indicates that no check will be performed.

HTTP
Methodstring

The method for the health check.

GET
Portinteger

The target port.

80
Pathstring

The path.

/
Intervalinteger

The interval for the health check, in seconds.

60
ExpectedCodesstring

The expected status codes, such as 200,202, indicating successful HTTP responses.

200,202
FollowRedirectsboolean

Whether to follow redirects.

  • true: Yes.
  • false: No.
true
ConsecutiveUpinteger

The number of consecutive successful probes required to consider the target healthy, such as 3.

3
ConsecutiveDowninteger

The number of consecutive failed probes required to consider the target unhealthy, such as 5.

5
Headerany

The header information included in the probe, such as HTTP headers.

{ "host": [ "example1.com", "example2.com" ] }
Timeoutinteger

Application health check timeout, in seconds.

5
Statusstring

The status of the load balancer.

healthy
SubRegionPoolsany

Address pools corresponding to secondary regions. When multiple secondary regions share a set of address pools, the keys can be concatenated with commas.

{"AL,MO": [92298024898****],"CN-SH,CN-SX,CN-SC":[92304347804****,92843536908****]}
RegionPoolsany

Address pools corresponding to primary regions.

{ "ENAM": [ 12345678**** ], "WNAM": [ 23456789****, 23456789**** ] }
PageNumberinteger

Page number, same as the PageNumber in the request parameters.

1
PageSizeinteger

Number of items per page.

10
TotalCountinteger

Total number of items.

100
TotalPageinteger

Total number of pages.

10

Examples

Sample success responses

JSONformat

{
  "RequestId": "CB1A380B-09F0-41BB-A198-72F8FD6DA2FE",
  "LoadBalancers": [
    {
      "Id": 998676487607104,
      "Name": "lb.example.com\n",
      "SiteId": 0,
      "Enabled": false,
      "Ttl": 30,
      "SessionAffinity": "ip",
      "FallbackPool": 0,
      "SteeringPolicy": "order",
      "Description": "test",
      "AdaptiveRouting": {
        "FailoverAcrossPools": true
      },
      "DefaultPools": [
        0
      ],
      "RandomSteering": {
        "DefaultWeight": 50,
        "PoolWeights": {
          "key": 50
        }
      },
      "Rules": [
        {
          "FixedResponse": {
            "ContentType": "application/json\n",
            "Location": "http://www.example.com/index.html\n",
            "MessageBody": "Hello World.\n",
            "StatusCode": 200
          },
          "Overrides": "{\n            \"adaptive_routing\": {\n                \"failover_across_pools\": true\n            },\n            \"sub_region_pools\": {\n                \"GB\": [\n                    96228666776****\n                ],\n                \"US\": [\n                    96228666776****\n                ]\n            },\n            \"default_pools\": [\n                96228666776****,\n                96228666776****\n            ],\n            \"fallback_pool\": 96228666776****,\n            \"location_strategy\": {\n                \"mode\": \"resolver_ip\",\n                \"prefer_ecs\": \"always\"\n            },\n            \"random_steering\": {\n                \"default_weight\": 30,\n                \"pool_weights\": {\n                    \"96228666776****\": 70,\n                    \"96228666776****\": 80\n                }\n            },\n            \"region_pools\": {\n                \"ENAM\": [\n                    96228666776****,\n                    92843536908****\n                ],\n                \"WNAM\": [\n                    92843536908****\n                ]\n            },\n            \"session_affinity\": \"cookie\",\n            \"session_affinity_attributes\": {\n                \"drain_duration\": 100,\n                \"headers\": [\"none\"],\n                \"require_all_headers\": false,\n                \"samesite\": \"Auto\",\n                \"secure\": \"Auto\",\n                \"zero_downtime_failover\": \"sticky\"\n            },\n            \"session_affinity_ttl\": 1800,\n            \"steering_policy\": \"dynamic_latency\",\n            \"ttl\": 30\n        }",
          "Rule": "http.request.uri.path contains \"/testing\"\n",
          "RuleName": "r2",
          "RuleEnable": "on",
          "Sequence": 1,
          "Terminates": true
        }
      ],
      "Monitor": {
        "Type": "HTTP\n",
        "Method": "GET\n",
        "Port": 80,
        "Path": "/\n",
        "Interval": 60,
        "ExpectedCodes": "200,202\n",
        "FollowRedirects": true,
        "ConsecutiveUp": 3,
        "ConsecutiveDown": 5,
        "Header": {
          "host": [
            "example1.com",
            "example2.com"
          ]
        },
        "Timeout": 5
      },
      "Status": "healthy",
      "SubRegionPools": "{\"AL,MO\": [92298024898****],\"CN-SH,CN-SX,CN-SC\":[92304347804****,92843536908****]}",
      "RegionPools": "{\n  \"ENAM\": [\n    12345678****\n  ],\n  \"WNAM\": [\n    23456789****,\n    23456789****\n  ]\n}"
    }
  ],
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 100,
  "TotalPage": 10
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is invalid.The specified parameter is invalid.
400InternalExceptionFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.
404SiteNotFoundThe website does not exist or does not belong to you.The website does not exist or does not belong to you.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-02-13The Error code has changed. The response structure of the API has changedView Change Details