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
RegionId String No cn-hangzhou

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

You can call the DescribeRegions operation to query the most recent region list.

Action String Yes DescribeLoadBalancerUDPListenerAttribute

The operation that you want to perform. Set the value to DescribeLoadBalancerUDPListenerAttribute.

LoadBalancerId String Yes lb-bp1rtfnodmywb43e*****

The ID of the CLB instance.

ListenerPort Integer Yes 80

The frontend port that is used by the CLB instance.

Valid values: 1 to 65535.

Response parameters

Parameter Type Example Description
VServerGroupId String rsp-cige6j****

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

Status String stopped

The status of the listener. Valid values:

  • running
  • stopped
AclType String white

The type of the network access control list (ACL). Valid values:

  • white: a whitelist. Only requests from the IP addresses or CIDR blocks in the network ACL are forwarded. Whitelists apply to scenarios in which you want to allow only specified IP addresses to access an application.

    Your service may be adversely affected if the whitelist is not properly configured. After a whitelist is configured, only requests from IP addresses that are added to the whitelist are forwarded by the listener. If a whitelist is configured but no IP address is added to the whitelist, the listener forwards all requests.

  • black: a blacklist. All requests from the IP addresses or CIDR blocks in the network ACL are blocked. Blacklists apply to scenarios in which you want to deny access from specific IP addresses or CIDR blocks to an application.

    If a blacklist is configured but no IP address is added to the blacklist, the listener forwards all requests.

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

The ID of the request.

HealthCheckConnectPort Integer 8080

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

Note This parameter takes effect only when the HealthCheck parameter is set to on.
Description String test

The description of the listener.

Bandwidth Integer -1

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

  • -1: For a pay-by-data-transfer Internet-facing CLB instance, this parameter is set to -1. This indicates that the bandwidth of the listener is unlimited.
  • 1 to 5120: For a pay-by-bandwidth Internet-facing CLB instance, you can specify the maximum bandwidth of each listener. The sum of maximum bandwidth of all listeners cannot exceed the maximum bandwidth of the CLB instance.
MasterSlaveServerGroupId String rsp-0bfucw****

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

BackendServerPort Integer 90

The backend port that is used by the CLB instance.

Note This parameter takes effect only when the VServerGroupId and MasterSlaveServerGroupId parameters are both empty.
AclStatus String off

Indicates whether access control is enabled. Valid values:

  • on: yes
  • off: no
UnhealthyThreshold Integer 4

The unhealthy threshold. The number of times that a healthy backend server must consecutively fail health checks before it is declared unhealthy. In this case, the health status is changed from success to fail. Valid values: 2 to 10.

ListenerPort Integer 53

The frontend port that is used by the CLB instance.

HealthCheckInterval Integer 5

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

HealthCheckExp String ok

The response string for UDP listener health checks. The string is up to 64 characters in length, and can contain letters and digits.

AclId String 123943****

The ID of the network ACL.

Scheduler String wrr

The scheduling algorithm. Valid values:

  • wrr: Backend servers with higher weights receive more requests than those with lower weights.
  • rr: Requests are distributed to backend servers in sequence.
HealthCheckConnectTimeout Integer 100

The timeout period of a health check. If a backend server does not respond within the specified timeout period, the backend server fails the health check. Unit: seconds.

Valid values: 1 to 300.

HealthyThreshold Integer 4

The healthy threshold. The number of times that an unhealthy backend server must consecutively pass health checks before it is declared healthy. In this case, the health status is changed from fail to success. Valid values: 2 to 10.

HealthCheckReq String hello

The request string for UDP listener health checks. The string is up to 64 characters in length, and can contain letters and digits.

HealthCheck String on

Indicates whether the health check feature is enabled. Valid values:

  • on: yes
  • off: no

Examples

Sample requests

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

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeLoadBalancerUDPListenerAttributeResponse>
    <VServerGroupId>rsp-cige6j****</VServerGroupId>
    <Status>stopped</Status>
    <AclType>white</AclType>
    <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
    <HealthCheckConnectPort>8080</HealthCheckConnectPort>
    <Description>test</Description>
    <Bandwidth>-1</Bandwidth>
    <MasterSlaveServerGroupId>rsp-0bfucw****</MasterSlaveServerGroupId>
    <BackendServerPort>90</BackendServerPort>
    <AclStatus>off</AclStatus>
    <UnhealthyThreshold>4</UnhealthyThreshold>
    <ListenerPort>53</ListenerPort>
    <HealthCheckInterval>5</HealthCheckInterval>
    <HealthCheckExp>ok</HealthCheckExp>
    <AclId>123943****</AclId>
    <Scheduler>wrr</Scheduler>
    <HealthCheckConnectTimeout>100</HealthCheckConnectTimeout>
    <HealthyThreshold>4</HealthyThreshold>
    <HealthCheckReq>hello</HealthCheckReq>
    <HealthCheck>on</HealthCheck>
    <PortRanges/>
</DescribeLoadBalancerUDPListenerAttributeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "VServerGroupId" : "rsp-cige6j****",
  "Status" : "stopped",
  "AclType" : "white",
  "RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710",
  "HealthCheckConnectPort" : 8080,
  "Description" : "test",
  "Bandwidth" : -1,
  "MasterSlaveServerGroupId" : "rsp-0bfucw****",
  "BackendServerPort" : 90,
  "AclStatus" : "off",
  "UnhealthyThreshold" : 4,
  "ListenerPort" : 53,
  "HealthCheckInterval" : 5,
  "HealthCheckExp" : "ok",
  "AclId" : "123943****",
  "Scheduler" : "wrr",
  "HealthCheckConnectTimeout" : 100,
  "HealthyThreshold" : 4,
  "HealthCheckReq" : "hello",
  "HealthCheck" : "on",
  "AclIds" : [ ],
  "PortRanges" : [ { } ]
}

Error codes

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