All Products
Search
Document Center

Server Load Balancer:DescribeLoadBalancerTCPListenerAttribute

Last Updated:Aug 11, 2026

Queries the configuration of a TCP listener.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

slb:DescribeLoadBalancerTCPListenerAttribute

get

*loadbalancer

acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}

  • slb:tag
  • slb:tag
  • slb:tag
  • slb:tag
  • slb:tag
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID of the Classic Load Balancer (CLB) instance.

You can query the region ID from the Regions and zones list or by invoking the DescribeRegions operation.

cn-hangzhou

LoadBalancerId

string

Yes

The ID of the Classic Load Balancer (CLB) instance.

lb-bp1ygod3yctvg1y****

ListenerPort

integer

Yes

The frontend port used by the Classic Load Balancer (CLB) instance.

Valid values: 1 to 65535.

80

Response elements

Element

Type

Description

Example

object

VServerGroupId

string

The ID of the associated vServer group.

rsp-cige6******8

Status

string

The status of the listener. Valid values:

  • running: The listener is running.

  • stopped: The listener is stopped.

stopped

AclType

string

The type of access control. Valid values:

  • white: Only requests from the IP addresses or CIDR blocks in the selected access control policy group are forwarded. Whitelists are applicable to scenarios in which you want to allow only specific IP addresses to access your application. Enabling a whitelist poses risks to your services. After a whitelist is enabled, only the IP addresses in the whitelist can access the SLB listener.

If a whitelist is enabled but no IP address is added to the access control policy group, the SLB listener forwards all requests.

  • black: All requests from the IP addresses or CIDR blocks in the selected access control policy group are not forwarded. Blacklists are applicable to scenarios in which you want to deny access from specific IP addresses to your application.

If a blacklist is enabled but no IP address is added to the access control policy group, the SLB listener forwards all requests.

Note

This parameter is required when the value of AclStatus is on.

white

ConnectionDrainTimeout

integer

The timeout period of connection draining. This parameter is returned when ConnectionDrain is set to on.

Valid values: 10 to 900. Unit: seconds.

300

RequestId

string

The request ID.

365F4154-92F6-4AE4-92F8-7FF34B540710

HealthCheckConnectPort

integer

The port used for health checks. Valid values: 1 to 65535. If this parameter is not set, the backend service port (BackendServerPort) is used.

8080

Description

string

The custom listener name.

TCP_80

Bandwidth

integer

The peak bandwidth of the listener. Unit: Mbit/s. Valid values:

  • -1: For a pay-by-traffic Internet-facing Server Load Balancer (SLB) instance, you can set the peak bandwidth to -1, which specifies unlimited bandwidth.

  • 1 to 5120: For a pay-by-bandwidth Internet-facing Server Load Balancer (SLB) instance, you can set the peak bandwidth for each listener. The sum of the peak bandwidth values of all listeners cannot exceed the peak bandwidth of the instance.

-1

HealthCheckType

string

The health check method of the TCP listener.

Valid values: tcp or http.

tcp

MasterSlaveServerGroupId

string

The ID of the associated primary/secondary server group.

rsp-0bfucw****

BackendServerPort

integer

The backend port used by the Classic Load Balancer (CLB) instance.

Note

This parameter is not displayed when the backend server group is a vServer group.

443

AclStatus

string

Indicates whether access control is enabled. Valid values:

  • on: enabled.

  • off: disabled.

off

HealthCheckDomain

string

The domain name used for health checks. Valid values:

  • $_ip: the private IP of the backend server. If $_ip is specified or this parameter is not specified, Server Load Balancer uses the private IP of each backend server as the domain name for health checks.

  • domain: The domain name must be 1 to 80 characters in length and can contain only letters, digits, periods (.), and hyphens (-).

www.domain.com

UnhealthyThreshold

integer

The unhealthy threshold. The number of consecutive health check failures before the health check status of a backend server is changed from success to failure. Valid values: 2 to 10.

4

HealthCheckHttpCode

string

The HTTP status code that indicates a Normal health check result.

http_2xx

ProxyProtocolV2Enabled

boolean

Indicates whether Proxy Protocol is used to carry the client source address to the backend server. Valid values:

  • true: enabled.

  • false: disabled.

false

PersistenceTimeout

integer

The timeout period of session persistence.

Valid values: 0 to 3600. Unit: seconds. Default value: 0, which indicates that session persistence is disabled.

0

ListenerPort

integer

The frontend port used by the SLB instance.

110

HealthCheckInterval

integer

The interval between two consecutive health checks. Valid values: 1 to 50. Unit: seconds.

5

HealthCheckURI

string

The URL used for health checks. The URL must be 1 to 80 characters in length and can contain only letters, digits, hyphens (-), forward slashes (/), periods (.), percent signs (%), question marks (?), number signs (#), and ampersands (&). The URL cannot be only a forward slash (/) but must start with a forward slash (/).

/test/index.html

AclId

string

The ID of the access control policy group associated with the listener.

This parameter is required when the value of AclStatus is on.

acl-uf60jwfi******

SynProxy

string

Indicates whether SynProxy, the attack prevention feature of Server Load Balancer, is enabled.

Do not modify this parameter. Let Server Load Balancer manage this parameter.

  • enable: enabled.

  • disable: disabled.

disable

Scheduler

string

The scheduling algorithm. Valid values:

  • wrr (default): Backend servers with higher weights receive more requests than those with lower weights through polling.

  • rr: Requests are distributed to backend servers in sequence based on access order.

  • sch: Consistent hashing based on source IP addresses. Requests from the same source IP address are distributed to the same backend server.

  • tch: Consistent hashing based on the following parameters: source IP address, destination IP address, source port, and destination port. Requests that contain the same information based on the four factors are distributed to the same backend server.

Note

Only guaranteed-performance instances support the sch and tch consistent hashing algorithms.

wrr

EstablishedTimeout

integer

The connection timeout period.

500

HealthCheckConnectTimeout

integer

The timeout period.

100

HealthyThreshold

integer

The healthy threshold. The number of consecutive health check successes before the health check status of a backend server is changed from failure to success. Valid values: 2 to 10.

4

ConnectionDrain

string

Indicates whether connection draining is enabled. This parameter is returned when ConnectionDrain is set to on. Valid values:

  • on: enabled.

  • off: disabled.

off

HealthCheckMethod

string

The health check method.

tcp

HealthCheck

string

Indicates whether health checks are enabled. Valid values:

  • on: enabled.

  • off: disabled.

on

AclIds

object

AclId

array

The list of access control policy group IDs.

LoadBalancerId

string

The ID of the SLB instance.

lb-bp1ygod3yctvg1y****

Tags

object

Tag

array<object>

The list of tags.

object

The list of tags.

TagKey

string

The tag key of the listener. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with aliyun or acs:. The tag key cannot contain http:// or https://.

TestKey

TagValue

string

The tag value of the listener. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with acs:. The tag value cannot contain http:// or https://.

TestValue

Examples

Success response

JSON format

{
  "VServerGroupId": "rsp-cige6******8",
  "Status": "stopped",
  "AclType": "white",
  "ConnectionDrainTimeout": 300,
  "RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "HealthCheckConnectPort": 8080,
  "Description": "TCP_80",
  "Bandwidth": -1,
  "HealthCheckType": "tcp",
  "MasterSlaveServerGroupId": "rsp-0bfucw****",
  "BackendServerPort": 443,
  "AclStatus": "off",
  "HealthCheckDomain": "www.domain.com",
  "UnhealthyThreshold": 4,
  "HealthCheckHttpCode": "http_2xx",
  "ProxyProtocolV2Enabled": false,
  "PersistenceTimeout": 0,
  "ListenerPort": 110,
  "HealthCheckInterval": 5,
  "HealthCheckURI": "/test/index.html",
  "AclId": "acl-uf60jwfi******",
  "SynProxy": "disable",
  "Scheduler": "wrr",
  "EstablishedTimeout": 500,
  "HealthCheckConnectTimeout": 100,
  "HealthyThreshold": 4,
  "ConnectionDrain": "off",
  "HealthCheckMethod": "tcp",
  "HealthCheck": "on",
  "AclIds": {
    "AclId": [
      ""
    ]
  },
  "LoadBalancerId": "lb-bp1ygod3yctvg1y****",
  "Tags": {
    "Tag": [
      {
        "TagKey": "TestKey",
        "TagValue": "TestValue"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 LocationServiceTimeout Location service connection timeout. Please try again later.
403 UnauthorizedRegion The specified region of is not authorized. The specified region of is not authorized.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.