All Products
Search
Document Center

Server Load Balancer:DescribeLoadBalancerUDPListenerAttribute

Last Updated:Oct 11, 2024

Queries the configurations of a UDP listener.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
slb:DescribeLoadBalancerUDPListenerAttributeget
  • loadbalancer
    acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
  • slb:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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

cn-hangzhou
LoadBalancerIdstringYes

The ID of the CLB instance.

lb-bp1rtfnodmywb43e*****
ListenerPortintegerYes

The frontend port used by the CLB instance.

Valid values: 1 to 65535.

80

Response parameters

ParameterTypeDescriptionExample
object
VServerGroupIdstring

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

rsp-cige6j****
Statusstring

The status of the listener. Valid values:

  • running
  • stopped
stopped
AclTypestring

The type of the 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 you enable a whitelist but do not add an IP address to the ACL, 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 for a listener but no IP address is added to the blacklist, the listener forwards all requests.

white
RequestIdstring

The ID of the request.

365F4154-92F6-4AE4-92F8-7FF34B540710
HealthCheckConnectPortinteger

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.
8080
Descriptionstring

The description of the listener.

test
Bandwidthinteger

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.
-1
MasterSlaveServerGroupIdstring

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

rsp-0bfucw****
BackendServerPortinteger

The backend port used by the CLB instance.

Note If the listener is associated with a vServer group, this parameter is not returned.
90
AclStatusstring

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

off
UnhealthyThresholdinteger

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.

4
ProxyProtocolV2Enabledboolean

Indicates whether the Proxy protocol is used to pass client IP addresses to backend servers. Valid values:

  • true: yes
  • false: no
false
ListenerPortinteger

The frontend port used by the CLB instance.

53
HealthCheckIntervalinteger

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

5
HealthCheckExpstring

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

ok
AclIdstring

The ID of the network ACL.

123943****
Schedulerstring

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.
wrr
HealthCheckConnectTimeoutinteger

The timeout period of a health check. If a backend Elastic Compute Service (ECS) instance does not return a health check response within the specified timeout period, the server fails the health check. Valid values: 1 to 300. Unit: seconds.

100
HealthyThresholdinteger

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.

4
HealthCheckReqstring

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

hello
HealthCheckstring

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

  • on: yes
  • off: no
on
AclIdsarray

The ID of the access control list (ACL).

LoadBalancerIdstring

The ID of the CLB instance.

lb-bp1rtfnodmywb43e*****
Tagsarray<object>

The tags.

Tagobject

The tags.

TagKeystring

The key of tag N. Valid values of N: 1 to 20. The tag value cannot be an empty string. The tag key can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with acs: or aliyun.

TestKey
TagValuestring

The value of tag N. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot start with acs:. It cannot contain http:// or https://.

TestValue

Examples

Sample success responses

JSONformat

{
  "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,
  "ProxyProtocolV2Enabled": false,
  "ListenerPort": 53,
  "HealthCheckInterval": 5,
  "HealthCheckExp": "ok",
  "AclId": "123943****",
  "Scheduler": "wrr",
  "HealthCheckConnectTimeout": 100,
  "HealthyThreshold": 4,
  "HealthCheckReq": "hello",
  "HealthCheck": "on",
  "AclIds": {
    "AclId": [
      ""
    ]
  },
  "LoadBalancerId": "lb-bp1rtfnodmywb43e*****",
  "Tags": {
    "Tag": [
      {
        "TagKey": "TestKey",
        "TagValue": "TestValue"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-10-09The response structure of the API has changedView Change Details
2024-10-09The response structure of the API has changedView Change Details
2024-05-28The response structure of the API has changedView Change Details