Queries the configurations of a UDP listener.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeLoadBalancerUDPListenerAttribute

The operation that you want to perform.

Set the value to DescribeLoadBalancerUDPListenerAttribute.

ListenerPort Integer Yes 80

The frontend port that is used by the Server Load Balancer (SLB) instance.

Valid values: 1 to 65535.

LoadBalancerId String Yes lb-bp1rtfnodmywb43e*****

The ID of the SLB instance.

RegionId String Yes cn-hangzhou

The ID of the region where the SLB instance is deployed.

Response parameters

Parameter Type Example Description
ListenerPort Integer 53

The frontend port that is used by the SLB instance.

BackendServerPort Integer 90

The backend port that is used by the SLB instance.

Note If the listener is associated with a vServer group, this parameter is not returned.
Bandwidth Integer -1

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

  • -1: For a pay-by-data-transfer Internet-facing SLB instance, this value is set to -1. This indicates that the bandwidth is unlimited.
  • 1 to 5120: For a pay-by-bandwidth Internet-facing SLB instance, each listener has a bandwidth limit. The sum of bandwidth limit values that are set for all listeners of an SLB instance does not exceed the bandwidth limit of the SLB instance.
Status String stopped

The state of the listener. Valid values:

  • running: indicates that the listener works as expected.
  • stopped: indicates that the listener is stopped.
Scheduler String wrr

The scheduling algorithm. Valid values:

  • wrr: Backend servers that have higher weights receive more requests than those that have lower weights. This is the default value.
  • wlc: Requests are distributed based on weights and number of connections to backend servers.

    If two backend servers have the same weight, the backend server that has fewer connections receives more requests.

  • rr: Requests are distributed to backend servers in sequence.
HealthCheck String on

Indicates whether health checks are enabled.

Valid values: on and off. Default value: on.

HealthyThreshold Integer 4

The healthy threshold. Indicates the number of successful health checks that must be consecutively performed before a backend server can be declared healthy (from fail to success). Valid values: 2 to 10.

UnhealthyThreshold Integer 4

The unhealthy threshold. Indicates the number of failed health checks that must be consecutively performed before a backend server can be declared unhealthy (from success to fail). Valid values: 2 to 10.

HealthCheckConnectTimeout Integer 100

The timeout period of a health check response. If a backend server does not respond within the specified time period, the health check fails. Valid values: 1 to 300. Unit: seconds.

HealthCheckConnectPort Integer 8080

The port that is used for health checks. Valid values: 1 to 65535. If this parameter is not set, the port specified by BackendServerPort is used for health checks.

Note This parameter takes effect only when the HealthCheck parameter is set to on.
HealthCheckInterval Integer 5

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

VServerGroupId String rsp-cige6j*****

The ID of the vServer group that is associated with the listener.

AclId String 123943*****

The ID of the network access control list (ACL).

AclStatus String off

Indicates whether access control is enabled for the listener. Valid values: on and off. Default value: off.

AclType String white

The type of network ACL. Valid values:

  • white: a whitelist. Only requests from the IP addresses and CIDR blocks that are specified in the network ACL are forwarded. Whitelists are applicable to scenarios that require you to allow only specific IP addresses to access an application.

    However, your business may be adversely affected if the whitelist is not set properly. After you set a whitelist for a listener, only requests from IP addresses that are added to the whitelist can be distributed by the listener. After you set a whitelist for a listener, if no IP address is added to the whitelist, the listener does not forward requests.

  • black: a blacklist. All requests from the IP addresses and CIDR blocks that are specified in the network ACL are denied. Blacklists are applicable to scenarios that require you to block access from specific IP addresses to an application.

    After you set a blacklist for a listener, if no IP address is added to the blacklist, the listener forwards all requests.

Description String Access control

The description of access control.

HealthCheckExp String ok

The response string for health checks that are performed by the UDP listener. The value can be up to 500 characters in length, and can contain only letters and digits.

HealthCheckReq String hello

The request string for health checks that are performed by the UDP listener. The value can be up to 500 characters in length, and can contain only letters and digits.

MasterSlaveServerGroupId String rsp-0bfucw****

The ID of the primary/secondary server group that is associated with the listener.

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeLoadBalancerUDPListenerAttribute
&ListenerPort=80
&LoadBalancerId=lb-bp1rtfnodmywb43e*****
&<Common request parameters>

Sample success responses

XML format

<DescribeLoadBalancerUDPListenerAttributeResponse>
    <AclStatus>off</AclStatus>
    <HealthCheck>on</HealthCheck>
    <HealthCheckConnectTimeout>5</HealthCheckConnectTimeout>
    <PersistenceTimeout>0</PersistenceTimeout>
    <ListenerPort>80</ListenerPort>
    <Status>stopped</Status>
    <Scheduler>wrr</Scheduler>
    <HealthyThreshold>3</HealthyThreshold>
    <HealthCheckInterval>2</HealthCheckInterval>
    <RequestId>9C103591-2533-432B-9E6B-6DB098C0E65C</RequestId>
    <UnhealthyThreshold>3</UnhealthyThreshold>
    <BackendServerPort>34</BackendServerPort>
    <Bandwidth>67</Bandwidth>
</DescribeLoadBalancerUDPListenerAttributeResponse>

JSON format

{
	"AclStatus":"off",
	"HealthCheck":"on",
	"HealthCheckConnectTimeout":5,
	"PersistenceTimeout":0,
	"ListenerPort":80,
	"Status":"stopped",
	"Scheduler":"wrr",
	"HealthyThreshold":3,
	"HealthCheckInterval":2,
	"RequestId":"9C103591-2533-432B-9E6B-6DB098C0E65C",
	"UnhealthyThreshold":3,
	"BackendServerPort":34,
	"Bandwidth":67
}

Error codes

For a list of error codes, visit the API Error Center.