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 Classic Load Balancer (CLB) instance.

Valid values: 1 to 65535.

LoadBalancerId String Yes lb-bp1rtfnodmywb43e*****

The ID of the CLB instance.

RegionId String Yes cn-hangzhou

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

Response parameters

Parameter Type Example Description
ListenerPort Integer 53

The frontend port that is used by the CLB instance.

BackendServerPort Integer 90

The backend port that is used by the CLB 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 CLB instance, this value is set to -1. This indicates that the maximum bandwidth value is unlimited.
  • 1 to 5120: For a pay-by-bandwidth Internet-facing CLB instance, you can specify a maximum bandwidth value for each listener. The sum of maximum bandwidth values that you set for all listeners cannot exceed the maximum bandwidth value of the CLB instance.
Status String stopped

The status of the listener. Valid values:

  • running: The listener runs as expected.
  • stopped: The listener is stopped.
Scheduler String wrr

The scheduling algorithm. Valid values:

  • wrr (default): Backend servers with higher weights receive more requests than backend servers with lower weights.
  • 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 number of consecutive health check successes before a backend server is declared as healthy. The number of health checks that an unhealthy backend server must consecutively pass before it can be declared healthy. In this case, the health check state is changed from fail to success. Valid values: 2 to 10.

UnhealthyThreshold Integer 4

The number of consecutive health check failures before a backend server is declared unhealthy. The number of health checks that a healthy backend server must consecutively fail before it can be declared unhealthy. In this case, the health check state is changed from success to fail. Valid values: 2 to 10.

HealthCheckConnectTimeout Integer 100

The timeout period of a health check response. If a backend Elastic Compute Service (ECS) instance does not send an expected response within the specified period of time, the ECS instance is considered 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 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: a whitelist. Only requests from the IP addresses or CIDR blocks in the ACL are forwarded. Whitelists apply to scenarios where you want to allow only specified IP addresses to access an application.

    Your business may be affected if the whitelist is not set properly. After a whitelist is configured, only IP addresses in the whitelist can access the CLB listener. If you enable a whitelist but the whitelist does not contain an IP address, the listener forwards all requests.

  • black: a blacklist. All requests from the IP addresses or CIDR blocks in the ACL are blocked. A blacklist is suitable for scenarios in which you want to block access from specific IP addresses or CIDR blocks to an application.

    If you enable a blacklist but the blacklist does not contain an IP address, the CLB listener forwards all requests.

Description String test

The description of the listener.

HealthCheckExp String ok

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

HealthCheckReq String hello

The request string for UDP listener health checks. The string 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>
  <Status>stopped</Status>
  <VServerGroupId>rsp-cige6j****</VServerGroupId>
  <ListenerPort>53</ListenerPort>
  <HealthCheckInterval>5</HealthCheckInterval>
  <Description>test</Description>
  <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
  <UnhealthyThreshold>4</UnhealthyThreshold>
  <Scheduler>wrr</Scheduler>
  <AclId>123943****</AclId>
  <HealthCheckConnectTimeout>100</HealthCheckConnectTimeout>
  <HealthCheck>on</HealthCheck>
  <BackendServerPort>90</BackendServerPort>
  <HealthCheckReq>hello</HealthCheckReq>
  <HealthCheckConnectPort>8080</HealthCheckConnectPort>
  <AclStatus>off</AclStatus>
  <HealthyThreshold>4</HealthyThreshold>
  <HealthCheckExp>ok</HealthCheckExp>
  <Bandwidth>-1</Bandwidth>
  <MasterSlaveServerGroupId>rsp-0bfucw****</MasterSlaveServerGroupId>
  <AclType>white</AclType>
</DescribeLoadBalancerUDPListenerAttributeResponse>

JSON format

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

Error codes

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