Queries the configuration of a UDP listener.
Try it now
RAM authorization
To call this operation, your Resource Access Management (RAM) policy must include the following authorization.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| slb:DescribeLoadBalancerUDPListenerAttribute | get | \*loadbalancer acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId} | slb:tag | None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| RegionId | string | No | The region of the Classic Load Balancer (CLB) instance. | cn-hangzhou |
| LoadBalancerId | string | Yes | The ID of the CLB instance. | lb-bp1rtfnodmywb43e\*\*\*\*\* |
| ListenerPort | integer | Yes | The frontend port of the CLB instance. Valid values: 1 to 65535. | 80 |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| RequestId | string | The request ID. | 365F4154-92F6-4AE4-92F8-7FF34B540710 |
| LoadBalancerId | string | The ID of the CLB instance. | lb-bp1rtfnodmywb43e\*\*\*\*\* |
| ListenerPort | integer | The frontend port of the CLB instance. | 53 |
| Description | string | The custom name of the listener. | UDP_80 |
| Status | string | The status of the listener. Valid values: running | stopped. | stopped |
| Bandwidth | integer | The maximum bandwidth of the listener, in Mbit/s. Valid values:<br>-1: No bandwidth limit. Applies to Internet-facing CLB instances billed by data transfer.<br>1 to 5120: The maximum bandwidth per listener. The sum of all listener bandwidth limits must not exceed the instance bandwidth. Applies to Internet-facing CLB instances billed by bandwidth. | -1 |
| Scheduler | string | The scheduling algorithm. Valid values:<br>wrr (default): Distributes requests to backend servers based on weight. Servers with higher weights receive more requests.<br>rr: Distributes requests to backend servers in sequence. | wrr |
| BackendServerPort | integer | The backend port of the CLB instance. Not returned if the backend server group is a vServer group. | 90 |
| VServerGroupId | string | The ID of the vServer group attached to the listener. | rsp-cige6j\*\*\*\* |
| MasterSlaveServerGroupId | string | The ID of the primary/secondary server group attached to the listener. | rsp-0bfucw\*\*\*\* |
| ProxyProtocolV2Enabled | boolean | Specifies whether Proxy Protocol v2 is enabled to pass client source IP addresses to backend servers. Valid values: true | false. | false |
| AclStatus | string | Specifies whether access control is enabled. Valid values: on | off (default). | off |
| AclId | string | The ID of the access control policy group. | acl-uf60jwfiv6\*\*\*\*\*\* |
| AclIds | object | The access control policy groups attached to the listener. | — |
| AclIds.AclId | array | The IDs of the access control policy groups. | — |
| AclType | string | The access control method. Valid values:<br>white: Whitelist. Forwards requests only from IP addresses or CIDR blocks in the selected access control policy group. Use this when your application restricts access to specific IP addresses. Warning Using a whitelist carries business risk. After you enable a whitelist, only IP addresses in the list can access the SLB listener. If the whitelist is enabled with no IP addresses added, all requests are forwarded.<br>black: Blacklist. Blocks requests from IP addresses or CIDR blocks in the selected access control policy group. Use this when your application needs to deny access from specific IP addresses. If the blacklist is enabled with no IP addresses added, all requests are forwarded. | white |
| HealthCheck | string | Specifies whether health checks are enabled. Valid values: on | off. | on |
| HealthCheckConnectPort | integer | The port used for health checks. Valid values: 1 to 65535. Defaults to the backend server port (BackendServerPort) if not specified. Takes effect only when HealthCheck is set to on. | 8080 |
| HealthCheckConnectTimeout | integer | The maximum wait time for a health check response, in seconds. If a backend server does not respond within this period, the health check fails. Valid values: 1 to 300. | 100 |
| HealthCheckInterval | integer | The interval between health checks, in seconds. Valid values: 1 to 50. | 5 |
| HealthyThreshold | integer | The number of consecutive successful health checks required before a backend server is considered healthy (status changes from failure to success). Valid values: 2 to 10. | 4 |
| UnhealthyThreshold | integer | The number of consecutive failed health checks required before a backend server is considered unhealthy (status changes from success to failure). Valid values: 2 to 10. | 4 |
| HealthCheckReq | string | The request string for UDP listener health checks. Only letters and digits are allowed. Maximum length: 64 characters. | hello |
| HealthCheckExp | string | The expected response string for UDP listener health checks. Only letters and digits are allowed. Maximum length: 64 characters. | ok |
| Tags | object | The tags attached to the listener. | — |
| Tags.Tag | array\<object\> | The list of tags. | — |
| Tags.Tag.TagKey | string | The tag key. Valid values for N: 1 to 20. The key cannot be left blank and can contain up to 128 characters. It cannot start with aliyun or acs: and cannot contain http:// or https://. | TestKey |
| Tags.Tag.TagValue | string | The tag value. Valid values for N: 1 to 20. The value can be empty and can contain up to 128 characters. It cannot start with acs: and cannot contain http:// or https://. | TestValue |
Examples
Success response
JSON format
{
"VServerGroupId": "rsp-cige6j****",
"Status": "stopped",
"AclType": "white",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710",
"HealthCheckConnectPort": 8080,
"Description": "UDP_80",
"Bandwidth": -1,
"MasterSlaveServerGroupId": "rsp-0bfucw****",
"BackendServerPort": 90,
"AclStatus": "off",
"UnhealthyThreshold": 4,
"ProxyProtocolV2Enabled": false,
"ListenerPort": 53,
"HealthCheckInterval": 5,
"HealthCheckExp": "ok",
"AclId": "acl-uf60jwfiv6******",
"Scheduler": "wrr",
"HealthCheckConnectTimeout": 100,
"HealthyThreshold": 4,
"HealthCheckReq": "hello",
"HealthCheck": "on",
"AclIds": {
"AclId": [
""
]
},
"LoadBalancerId": "lb-bp1rtfnodmywb43e*****",
"Tags": {
"Tag": [
{
"TagKey": "TestKey",
"TagValue": "TestValue"
}
]
}
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.