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 DescribeLoadBalancerUDPListenerAttribut.

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 maximum bandwidth value of the listener. Unit: Mbit/s. Valid values:

  • -1: For a pay-by-data-transfer Internet-facing SLB instance, you can set the value to -1. This indicates that the maximum bandwidth value is unlimited.
  • 1 to 5120: For a pay-by-bandwidth Internet-facing SLB instance, you can specify a bandwidth cap for each listener. The sum of maximum bandwidth values that you set for all listeners cannot exceed the maximum bandwidth value of the SLB instance.
Status String stopped

The state of the listener. Valid values:

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

The scheduling algorithm. Valid values:

  • wrr (default): Backend servers that have higher weights receive more requests than those that have lower weights.
  • rr: Requests are sequentially distributed to backend servers. This is the default forwarding algorithm.
HealthCheck String on

Indicates whether health checks are enabled.

Valid values: on and off.

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 backend server is declared unhealthy. 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 if 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 access control list (ACL).

AclStatus String off

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

AclType String white

The type of ACL. Valid values:

  • white: specifies the ACL as a whitelist. Only requests from the IP addresses or CIDR blocks in the ACL are forwarded. Whitelists apply to scenarios that require you to allow only specific IP addresses to access an application.

    Risks may occur if the whitelist is improperly set. After you set a whitelist for an SLB listener, only requests from IP addresses that are added to the whitelist are distributed by the listener. If the whitelist is enabled without IP addresses specified, the SLB listener does not forward requests.

  • black: specifies the ACL as a blacklist. All requests from the IP addresses or CIDR blocks in the ACL are rejected. Blacklists apply to scenarios that require you to block access from specific IP addresses to an application.

    If the blacklist is enabled but the corresponding ACL does not contain an IP address, the SLB listener distributes all requests.

Description String test

The description of the listener.

HealthCheckExp String ok

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

HealthCheckReq String hello

The request string for health checks that are performed by the UDP listener. The value must be 1 to 64 characters in length, and can contain 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.