All Products
Search
Document Center

Server Load Balancer:DescribeLoadBalancerHTTPListenerAttribute

Last Updated:Apr 03, 2026

Queries the configuration of an HTTP listener on a Classic Load Balancer (CLB) instance.

Prerequisites

Before you begin, ensure that you have:

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

To call this operation, your RAM user or RAM role must have the following permissions. Define these in a Resource Access Management (RAM) policy using the fields described below.

  • Action: The action to include in the Action element of a RAM policy statement.

  • Access level: The predefined access level for this action. Valid values: create, list, get, update, and delete.

  • Resource type: The resource type that supports authorization. Required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element. For actions without resource-level permissions, use an asterisk (*) in the Resource element.

  • Condition key: Condition keys defined by the service, used for fine-grained access control. In addition to service-specific keys, Alibaba Cloud provides common condition keys applicable to all RAM-supported services.

  • Dependent action: Additional actions required to complete this action. The RAM user or role must have permission for all dependent actions.

ActionAccess levelResource typeCondition keyDependent action
slb:DescribeLoadBalancerHTTPListenerAttributeget*loadbalanceracs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}slb:tagNone

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNoThe region of the CLB instance. Call DescribeRegions to get the region ID.cn-hangzhou
LoadBalancerIdstringYesThe ID of the CLB instance.lb-bp1uaunez0uho0zf0****
ListenerPortintegerYesThe frontend port of the CLB instance. Valid values: 1 to 65535.80

Response elements

ElementTypeDescriptionExample
RequestIdstringThe request ID.365F4154-92F6-4AE4-92F8-7FF34B540710
LoadBalancerIdstringThe ID of the CLB instance.lb-bp1uaunez0uho0zf0****
ListenerPortintegerThe frontend port of the CLB instance.80
DescriptionstringThe name of the listener.HTTP_80
StatusstringThe status of the listener. Valid values: running | stoppedstopped
BandwidthintegerThe maximum bandwidth of the listener, in Mbit/s. -1 means the bandwidth is unlimited. For values from 1 to 5120, the sum of the maximum bandwidth of all listeners on a CLB instance cannot exceed the maximum bandwidth of that instance.-1
SchedulerstringThe routing algorithm. Valid values: wrr (weighted round robin — servers with higher weights receive more requests) | rr (round robin — requests are distributed sequentially)wrr
BackendServerPortintegerThe backend port of the CLB instance.80
VServerGroupIdstringThe ID of the associated server group.rsp-cige6j****
ListenerForwardstringSpecifies whether HTTP-to-HTTPS redirect is enabled. Valid values: on | offon
ForwardPortintegerThe listener port to which HTTP requests are redirected over HTTPS. Returned only when ListenerForward is set to on.80
StickySessionstringSpecifies whether session persistence is enabled. Valid values: on | offon
StickySessionTypestringThe method used to handle cookies. Required when StickySession is on. Valid values: insert (CLB inserts a SERVERID session cookie into the first HTTP or HTTPS response; subsequent requests carry this cookie and are routed to the same backend server) | server (when CLB detects a user-defined cookie, it overwrites the original cookie; subsequent requests carry the user-defined cookie and are forwarded to the recorded backend server)insert
CookiestringThe cookie configured on the server.testCookie
CookieTimeoutintegerThe cookie timeout period, in seconds.500
IdleTimeoutintegerThe idle connection timeout period, in seconds. Default value: 15. Valid values: 1 to 60. If no request is received within this period, CLB closes the connection. When a new request arrives, CLB establishes a new connection.2
RequestTimeoutintegerThe request timeout period, in seconds. Default value: 60. Valid values: 1 to 180. If no response is received from a backend server within this period, CLB returns an HTTP 504 error to the client.34
GzipstringSpecifies whether Gzip compression is enabled for specific file types. Valid values: on | offon
SecurityStatusstringSpecifies whether the listener is in the Secure state. Valid values: on | offon
AclStatusstringSpecifies whether access control is enabled. Valid values: on | offoff
AclIdstringThe ID of the access control list (ACL) associated with the listener. Returned when AclStatus is on.acl-uf60jw******
AclTypestringThe type of ACL. Required when AclStatus is on. Valid values: white (whitelist — only requests from IP addresses or CIDR blocks in the ACL are forwarded; if the whitelist is configured but empty, all requests are forwarded) | black (blacklist — all requests from IP addresses or CIDR blocks in the ACL are rejected; if the blacklist is configured but empty, all requests are forwarded)white
XForwardedForstringSpecifies whether the X-Forwarded-For header is used to preserve the real client IP address. Valid values: on | offon
XForwardedFor_SLBIDstringSpecifies whether the SLB-ID header is used to retrieve the CLB instance ID. Valid values: on | offon
XForwardedFor_SLBIPstringSpecifies whether the SLB-IP header is used to retrieve the virtual IP address requested by the client. Valid values: on | offon
XForwardedFor_SLBPORTstringSpecifies whether the XForwardedFor_SLBPORT header is used to retrieve the listener port of the CLB instance. Valid values: on | offoff
XForwardedFor_protostringSpecifies whether the X-Forwarded-Proto header is used to retrieve the listener protocol. Valid values: on | offon
XForwardedFor_ClientSrcPortstringSpecifies whether the XForwardedFor_ClientSrcPort header is used to retrieve the client port. Valid values: on | offoff
HealthCheckstringSpecifies whether health checks are enabled. Valid values: on | offon
HealthCheckConnectPortintegerThe port used for health checks. Takes effect only when HealthCheck is on.8080
HealthCheckDomainstringThe domain name used for health checks.www.domain.com
HealthCheckURIstringThe URL path used for health checks. Must be 1 to 80 characters in length, start with a forward slash (/), and cannot be a single forward slash. Allowed characters: digits, letters, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&)./test/index.html
HealthCheckHttpCodestringThe HTTP status codes that indicate a successful health check.http_2xx,http_3xx
HealthCheckIntervalintegerThe interval between health checks, in seconds.5
HealthCheckTimeoutintegerThe timeout period for each health check, in seconds.3
HealthyThresholdintegerThe healthy threshold — the number of consecutive successful health checks required before a backend server is declared healthy.4
UnhealthyThresholdintegerThe unhealthy threshold — the number of consecutive failed health checks required before a backend server is declared unhealthy.4
HealthCheckMethodstringThe health check method for HTTP listeners. Returned when HealthCheck is on. Valid values: head | getget
AclIdsobjectThe list of ACL IDs associated with the listener.
AclIds.AclIdarrayThe ACL IDs.
RulesobjectThe forwarding rules associated with the listener.
Rules.Rulearray\<object\>The list of forwarding rules.
Rules.Rule.RuleIdstringThe ID of the forwarding rule.1234
Rules.Rule.RuleNamestringThe name of the forwarding rule.test
Rules.Rule.DomainstringThe domain name in the forwarding rule.www.example.com
Rules.Rule.UrlstringThe request URL in the forwarding rule./example
Rules.Rule.VServerGroupIdstringThe ID of the server group specified in the forwarding rule.rsp-uf6w******
TagsobjectThe tags attached to the listener.
Tags.Tagarray\<object\>The tags.
Tags.Tag.TagKeystringThe tag key. Valid values of N: 1 to 20. Cannot be empty. Max 64 characters. Cannot start with acs: or aliyun, or contain http:// or https://.TestKey
Tags.Tag.TagValuestringThe tag value. Valid values of N: 1 to 20. Can be empty. Max 128 characters. Cannot start with acs:, or contain http:// or https://.TestValue

Examples

Success response

JSON format

{
  "AclType": "white",
  "VServerGroupId": "rsp-cige6j****",
  "Status": "stopped",
  "XForwardedFor_ClientSrcPort": "off",
  "Cookie": "testCookie",
  "Gzip": "on",
  "HealthCheckConnectPort": 8080,
  "RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "Description": "HTTP_80",
  "Bandwidth": -1,
  "HealthCheckTimeout": 3,
  "AclStatus": "off",
  "BackendServerPort": 80,
  "CookieTimeout": 500,
  "HealthCheckDomain": "www.domain.com",
  "UnhealthyThreshold": 4,
  "ForwardPort": 80,
  "XForwardedFor_SLBID": "on",
  "SecurityStatus": "on",
  "HealthCheckHttpCode": "http_2xx,http_3xx",
  "ListenerForward": "on",
  "XForwardedFor": "on",
  "IdleTimeout": 2,
  "RequestTimeout": 34,
  "ListenerPort": 80,
  "HealthCheckInterval": 5,
  "XForwardedFor_SLBPORT": "off",
  "HealthCheckURI": "/test/index.html",
  "StickySessionType": "insert",
  "AclId": "acl-uf60jw******",
  "Scheduler": "wrr",
  "HealthyThreshold": 4,
  "XForwardedFor_proto": "on",
  "XForwardedFor_SLBIP": "on",
  "StickySession": "on",
  "HealthCheckMethod": "get",
  "HealthCheck": "on",
  "AclIds": {
    "AclId": [
      ""
    ]
  },
  "Rules": {
    "Rule": [
      {
        "VServerGroupId": "rsp-uf6w******",
        "Url": "/example",
        "Domain": "www.example.com",
        "RuleName": "test",
        "RuleId": "1234"
      }
    ]
  },
  "LoadBalancerId": "lb-bp1uaunez0uho0zf0****",
  "Tags": {
    "Tag": [
      {
        "TagKey": "TestKey",
        "TagValue": "TestValue"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.