Modifies the configurations of a UDP listener.
Operation description
A Classic Load Balancer (CLB) instance is created. For more information, see CreateLoadBalancer.
A UDP listener is created. For more information, see CreateLoadBalancerUDPListener.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:SetLoadBalancerUDPListenerAttribute |
update |
*acl
*loadbalancer
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID of the CLB instance. You can call the DescribeRegions operation to query the most recent region list. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
The ID of the CLB instance. |
lb-bp1rtfnodmywb43ecu4sf-c**** |
| ListenerPort |
integer |
Yes |
The frontend port used by the CLB instance. Valid values: 1 to 65535. |
80 |
| Bandwidth |
integer |
No |
The maximum bandwidth of the listener. Unit: Mbit/s. Valid values:
|
-1 |
| Scheduler |
string |
No |
The scheduling algorithm. Valid values:
Note
|
wrr |
| HealthyThreshold |
integer |
No |
The number of times that an unhealthy backend server must consecutively pass health checks before it can be declared healthy (from fail to success). Valid values: 1 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: 1 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 return a health check response within the specified timeout period, the server fails the health check. Unit: seconds. Valid values: 1 to 300. Note
If the value of the HealthCheckConnectTimeout parameter is smaller than that of the HealthCheckInterval parameter, the timeout period specified by the HealthCheckConnectTimeout parameter is ignored and the period of time specified by the HealthCheckInterval parameter is used as the timeout period. |
100 |
| HealthCheckConnectPort |
integer |
No |
The port that is used for health checks. Valid values: 1 to 65535. |
80 |
| HealthCheckInterval |
integer |
No |
The interval at which health checks are performed. Unit: seconds. Valid values: 1 to 50. |
5 |
| 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 |
| VServerGroup |
string |
No |
Specifies whether to use a vServer group. Valid values:
Note
You cannot set both VserverGroup and MasterSlaveServerGroup to on. |
on |
| VServerGroupId |
string |
No |
The ID of the vServer group. |
rsp-cige6**** |
| MasterSlaveServerGroupId |
string |
No |
The ID of the primary/secondary server group. Note
You cannot specify both VServerGroupId and MasterSlaveServerGroupId. |
rsp-0bfuc**** |
| MasterSlaveServerGroup |
string |
No |
Specifies whether to use a primary/secondary server group. Valid values:
Note
You cannot set VserverGroup and MasterSlaveServerGroup both to on. |
on |
| AclId |
string |
No |
The ID of the network access control list (ACL) that is associated with the listener. Note
If AclStatus is set to on, this parameter is required. |
off |
| AclType |
string |
No |
The type of the network ACL. Valid values:
Note
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 elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
Examples
Success response
JSON format
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
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 | 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 | OperationFailed.ServerGroupInUse | The VServerGroup or MasterSlaveServerGroup can not be close for this listener. | |
| 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 | InvalidParam.PortRange | The specified PortRange is invalid. | |
| 400 | Duplicated.AclEntry | %s. | %s |
| 400 | InvalidParamLength.HealthCheckReq | The length of the parameter HealthCheckReq is invalid. | |
| 400 | InvalidParamLength.HealthCheckExp | The length of the parameter HealthCheckExp 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 | MissingParam.VServerGroupId | The parameter VServerGroupId is missing. | |
| 400 | VipNotSupportQuicVersion | The listener does not support the parameter of QuicVersion. | |
| 400 | IllegalParam.HealthCheckType | The param of HealthCheckType is illegal. | |
| 400 | IllegalParam.HealthCheckMethod | The param of HealthCheckMethod is illegal. | |
| 400 | IllegalParam.HealthCheck | The param of HealthCheck is illegal. | |
| 400 | OperationDenied.MasterSlaveGroupLogEnabled | The operation is denied because of MasterSlaveGroupLogEnabled. | |
| 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 | Abs.VServerGroupIdAndMasterSlaveServerGroupId.MissMatch | Virtual service group ID or master slave server group ID is missing. Please check the input parameters. | |
| 400 | AclListenerOverLimit | This acl has reached the limit of binding to listeners. | |
| 400 | QuotaLimitExceeds.AclAttachedToListener | The number of Acl bound listeners has reached the quota limit | |
| 400 | QuotaLimitExceeds.TotalAclEntry | The number of Acl entries has reached the quota limit. | |
| 400 | QuotaLimitExceeds.AclListenerOverLimit | This acl has reached the limit of binding to listeners. | |
| 403 | UnauthorizedRegion | The specified region of is not authorized. | The specified region of is not authorized. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.