Creates a UDP listener.
Operation description
UDP listeners of Classic Load Balancer (CLB) instances in a classic network cannot pass client IP addresses to backend servers.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
slb:CreateLoadBalancerUDPListener | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The ID of the region where the CLB instance is deployed. | cn-hangzhou |
Tag | array<object> | No | The tags. | |
object | No | The tags. | ||
Key | string | No | The key of the tag. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key must be 1 to 64 characters in length and cannot start with | TestKey |
Value | string | No | The tag value. 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 | TestValue |
LoadBalancerId | string | Yes | The ID of the CLB instance. | lb-bp1ygod3yctvg1y7**** |
ListenerPort | integer | Yes | The frontend port used by the CLB instance. Valid values: 1 to 65535. | 80 |
BackendServerPort | integer | No | The backend port used by the CLB instance. Valid values: 1 to 65535. If the VServerGroupId parameter is not set, this parameter is required. | 80 |
Bandwidth | integer | Yes | The maximum bandwidth of the listener. Unit: Mbit/s. Valid values: -1: For a pay-by-data-transfer Internet-facing CLB instance, you can set this parameter to -1. This way, the bandwidth of the listener is unlimited. | -1 |
Scheduler | string | No | The routing algorithm. Valid values:
Only high-performance CLB instances support the sch, tch, and qch consistent hashing algorithms. | wrr |
HealthyThreshold | integer | No | 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 |
UnhealthyThreshold | integer | No | 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 |
HealthCheckConnectTimeout | integer | No | The timeout period of a health check. If a backend server, such as an Elastic Compute Service (ECS) instance, does not respond to a probe packet within the specified timeout period, the server fails the health check. Unit: seconds. Valid values: 1 to 300. | 100 |
HealthCheckConnectPort | integer | No | 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. | 80 |
healthCheckInterval | integer | No | The interval between two consecutive health checks. Unit: seconds. Valid values: 1 to 50. | 3 |
healthCheckReq | string | No | The request string for UDP listener health checks. The string must be 1 to 64 characters in length and can contain only letters and digits. | hello |
healthCheckExp | string | No | The response string for UDP listener health checks. The string must be 1 to 64 characters in length and can contain only letters and digits. | ok |
VServerGroupId | string | No | The ID of the vServer group. | rsp-cige6j8**** |
MasterSlaveServerGroupId | string | No | The ID of the primary/secondary server group. Note
You can set only one of the VServerGroupId and MasterSlaveServerGroupId parameters.
| rsp-0bfucwu**** |
AclId | string | No | The ID of the network ACL that is associated with the listener. If AclStatus is set to on, this parameter is required. | 123 |
AclType | string | No | The type of the network ACL. Valid values:
If AclStatus is set to on, this parameter is required. | white |
AclStatus | string | No | Specifies whether to enable access control. Valid values:
| off |
Description | string | No | The name of the listener. The name must be 1 to 256 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_). | udp_80 |
ProxyProtocolV2Enabled | boolean | No | Specifies whether to use the Proxy protocol to pass client IP addresses to backend servers. Valid values:
| false |
HealthCheckSwitch | string | No | Specifies whether to enable the health check feature. Valid values:
| on |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "06F00FBB-3D9E-4CCE-9D43-1A6946A75556"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameterValue.SpecNotSupport | The loadBalancer of shared spec does not support the parameter value, %s. | - |
400 | OperationNotSupport.Acl | The cloud box instance does not support acl. | - |
400 | InvalidParameterValue.RegionNotSupport | The region does not support the parameter value, %s. | - |
400 | Abs.VServerGroupIdAndMasterSlaveServerGroupId.MissMatch | The parameters VServerGroupId or MasterSlaveServerGroupId miss match. | - |
400 | IpVersionConflict | The ip version of this LoadBalancer and the Acl is conflict. | - |
400 | InvalidParameterValue.ZoneNotSupport | The zone does not support the parameter value, %s. | - |
400 | ListenerProcessing | A previous configuration of the listener is pending,please try again later. | - |
400 | AclNotExist | Acl does not exist. | - |
400 | InvalidParameter.ListenerPortConflict | There is conflict listener port exists. | - |
400 | InvalidParam.VServerGroupId | The specified VServerGroupId is invalid. | - |
400 | MissingParam.HealthCheckConnectPort | The parameter HealthCheckConnectPort is required. | - |
400 | InvalidParam.ListenerPort | The specified ListenerPort is invalid. | - |
400 | InvalidParam.StartPort | The specified StartPort is invalid. | - |
400 | InvalidParamSize.PortRange | The size of param PortRange is invalid. | - |
400 | InvalidParam.EndPort | The specified EndPort is invalid. | - |
400 | QuotaLimitExceeds.AclAttachedToListener | %s. | - |
400 | QuotaLimitExceeds.TotalAclEntry | %s. | - |
400 | AclListenerOverLimit | %s. | - |
400 | Duplicated.AclEntry | %s. | - |
400 | InvalidParameter.RegionNotSupport | The region does not support the parameter: %s. | - |
400 | LbNotSupportTcpssl | You cannot create a TCP SSL type listener for the specified load balancer. | - |
400 | LbSupportTcpsslOnly | The specified load balancer supports TCP SSL type listener only. | - |
400 | ListenerNotSupportRule | You cannot create a rule for the specified listener. | You cannot create a rule for the specified listener. |
400 | InvalidParamLength.HealthCheckExp | The length of the parameter HealthCheckReq is invalid. | - |
400 | InvalidParamLength.HealthCheckReq | The length of the parameter HealthCheckReq is invalid. | - |
400 | InvalidParam.HealthCheckReq | The param HealthCheckReq is invalid. | - |
400 | InvalidParam.HealthCheckExp | The param HealthCheckExp is invalid. | - |
400 | ResourceNotFound.VServerGroup | %s. | - |
400 | IllegalParam.FailoverThreshold | The parameter FailoverThreshold is illegal. | - |
400 | IllegalParam.FailoverStrategy | The parameter FailoverStrategy is illegal. | - |
400 | InvalidParameter.ZoneNotSupport | The zone does not support the parameter %s. | - |
400 | MasterSlaveServerConflict | The servers are conflict for MasterSlaveGroup. | - |
400 | VipNotSupportQuicVersion | The listener does not support the parameter of QuicVersion. | - |
400 | IllegalParam.HealthCheckType | The param of HealthCheckType is illegal. | - |
400 | MissingParam.HealthCheckMethod | The param of HealthCheckMethod is missing. | - |
400 | IllegalParam.HealthCheckMethod | The param of HealthCheckMethod is illegal. | - |
400 | IllegalParam.HealthCheck | The param of HealthCheck is illegal. | - |
400 | OperationDenied.SpecialListenerPortNotAllowed | The operation is not allowed because port 4789 is reserved by the system. | - |
400 | Mismatch.SlbSpecTypeAndListenerProtocol | The SlbSpecType and ListenerProtocol are mismatched. | - |
400 | OperationDenied.OnlyIpv4SlbSupport | The operation is not allowed because of OnlyIpv4SlbSupport. | - |
400 | OperationDenied.FullNatModeNotAllowed | The operation is not allowed because of FullNatModeNotAllowed. | - |
400 | SpecNotSupportParameter | The instance with share spec does not support FullNatEnabled parameter. | - |
400 | InvalidParam.TagValue | %s. | - |
400 | InvalidParam.TagKey | %s. | - |
400 | SizeLimitExceeded.Tag | %s. | - |
400 | MissingParam.TagKey | The param MissingParam.TagKey is missing. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-06-02 | The Error code has changed | View Change Details |