修改UDP协议监听的配置。
接口说明
您已经创建传统型负载均衡,具体操作,请参见 CreateLoadBalancer 。
您已经创建 UDP 监听,具体操作,请参见 CreateLoadBalancerUDPListener 。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
slb:SetLoadBalancerUDPListenerAttribute |
update |
*acl
*loadbalancer
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
否 |
传统型负载均衡实例的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| LoadBalancerId |
string |
是 |
传统型负载均衡实例的 ID。 |
lb-bp1rtfnodmywb43ecu4sf-c**** |
| ListenerPort |
integer |
是 |
传统型负载均衡实例前端使用的端口。 取值范围:1~65535。 |
80 |
| Bandwidth |
integer |
否 |
监听的带宽峰值,单位:Mbps。取值:
|
-1 |
| Scheduler |
string |
否 |
调度算法。取值:
说明
|
wrr |
| HealthyThreshold |
integer |
否 |
健康检查连续成功多少次后,将后端服务器的健康检查状态由 fail 判定为 success。 取值范围:1~10。 |
4 |
| UnhealthyThreshold |
integer |
否 |
健康检查连续失败多少次后,将后端服务器的健康检查状态由 success 判定为 fail。 取值范围:1~10。 |
4 |
| HealthCheckConnectTimeout |
integer |
否 |
接收来自运行状况检查的响应需要等待的时间。如果后端 ECS 在指定的时间内没有正确响应,则判定为健康检查失败。单位:秒。 取值范围:1~300。 说明
如果 HealthCheckConnectTimeout 的值小于 HealthCheckInterval 的值,则 HealthCheckConnectTimeout 无效,超时时间为 HealthCheckInterval 的值。 |
100 |
| HealthCheckConnectPort |
integer |
否 |
健康检查使用的端口。 取值范围:1~65535。 |
80 |
| HealthCheckInterval |
integer |
否 |
健康检查的时间间隔,单位:秒。 取值范围:1~50。 |
5 |
| healthCheckReq |
string |
否 |
UDP 监听健康检查的请求串,只允许包含字母、数字,最大长度限制为 64 个字符。 |
hello |
| healthCheckExp |
string |
否 |
UDP 监听健康检查的响应串,只允许包含字母、数字,最大长度限制为 64 个字符。 |
ok |
| VServerGroup |
string |
否 |
是否使用虚拟服务器组。取值:
说明
VserverGroup 和 MasterSlaveServerGroup 只允许一个值为 on。 |
on |
| VServerGroupId |
string |
否 |
虚拟服务器组 ID。 |
rsp-cige6**** |
| MasterSlaveServerGroupId |
string |
否 |
主备服务器组 ID。 说明
虚拟服务器组 ID 和主备服务器组 ID 只能选择一个。 |
rsp-0bfuc**** |
| MasterSlaveServerGroup |
string |
否 |
是否使用主备服务器组。取值:
说明
VserverGroup 和 MasterSlaveServerGroup 只允许取值为 on。 |
on |
| AclId |
string |
否 |
监听绑定的访问策略组 ID。 说明
当 AclStatus 参数的值为 on 时,该参数必选。 |
off |
| AclType |
string |
否 |
访问控制类型。取值:
说明
当 AclStatus 参数的值为 on 时,该参数有效。 |
white |
| AclStatus |
string |
否 |
是否开启访问控制功能。取值:
|
off |
| Description |
string |
否 |
自定义监听名称。 长度限制为 1~256 个字符,支持中文、字母、数字、短划线(-)、正斜线(/)、半角句号(.)和下划线(_)。 |
udp_80 |
| ProxyProtocolV2Enabled |
boolean |
否 |
是否支持通过 Proxy Protocol 协议携带客户端源地址到后端服务器。取值:
|
false |
| HealthCheckSwitch |
string |
否 |
是否开启健康检查。取值:
|
on |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
示例
正常返回示例
JSON格式
{
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. | 指定负载均衡的IP版本与ACL支持的IP类型冲突。 |
| 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. | 指定的VServerGroupId无效。请检查参数约束,并在修改后重试。 |
| 400 | MissingParam.HealthCheckConnectPort | The parameter HealthCheckConnectPort is required. | 参数HealthCheckConnectPort缺失。 |
| 400 | InvalidParam.ListenerPort | The specified ListenerPort is invalid. | 指定的ListenerPort无效。请检查参数约束,并在修改后重试。 |
| 400 | InvalidParam.StartPort | The specified StartPort is invalid. | 指定的StartPort无效。请检查参数约束,并在修改后重试。 |
| 400 | InvalidParamSize.PortRange | The size of param PortRange is invalid. | 指定的PortRange无效。请检查参数约束,并在修改后重试。 |
| 400 | InvalidParam.EndPort | The specified EndPort is invalid. | 指定的EndPort无效。请检查参数约束,并在修改后重试。 |
| 400 | InvalidParam.PortRange | The specified PortRange is invalid. | 指定的PortRange无效。请检查参数约束,并在修改后重试。 |
| 400 | Duplicated.AclEntry | %s. | %s |
| 400 | InvalidParamLength.HealthCheckReq | The length of the parameter HealthCheckReq is invalid. | 指定的HealthCheckReq无效。请检查参数约束,并在修改后重试。 |
| 400 | InvalidParamLength.HealthCheckExp | The length of the parameter HealthCheckExp is invalid. | 指定的HealthCheckExp无效。请检查参数约束,并在修改后重试。 |
| 400 | InvalidParam.HealthCheckReq | The param HealthCheckReq is invalid. | 指定的HealthCheckReq无效。请检查参数约束,并在修改后重试。 |
| 400 | InvalidParam.HealthCheckExp | The param HealthCheckExp is invalid. | 指定的HealthCheckExp无效。请检查参数约束,并在修改后重试。 |
| 400 | ResourceNotFound.VServerGroup | %s. | 指定的服务器组不存在。 |
| 400 | IllegalParam.FailoverThreshold | The parameter FailoverThreshold is illegal. | 指定的FailoverThreshold无效。请检查参数约束,并在修改后重试。 |
| 400 | IllegalParam.FailoverStrategy | The parameter FailoverStrategy is illegal. | 指定的FailoverStrategy无效。请检查参数约束,并在修改后重试。 |
| 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. | 参数VServerGroupId缺失。 |
| 400 | VipNotSupportQuicVersion | The listener does not support the parameter of QuicVersion. | 当前监听不支持QuicVersion参数。 |
| 400 | IllegalParam.HealthCheckType | The param of HealthCheckType is illegal. | 指定的HealthCheckType无效。请检查参数约束,并在修改后重试。 |
| 400 | IllegalParam.HealthCheckMethod | The param of HealthCheckMethod is illegal. | 指定的HealthCheckMethod无效。请检查参数约束,并在修改后重试。 |
| 400 | IllegalParam.HealthCheck | The param of HealthCheck is illegal. | 指定的HealthCheck无效。请检查参数约束,并在修改后重试。 |
| 400 | OperationDenied.MasterSlaveGroupLogEnabled | The operation is denied because of MasterSlaveGroupLogEnabled. | 操作被拒绝,原因是主备服务器组日志已启用。 |
| 400 | OperationDenied.OnlyIpv4SlbSupport | The operation is not allowed because of OnlyIpv4SlbSupport. | 操作被拒绝,原因是只有IPV4实例支持开启FULL NAT模式。 |
| 400 | OperationDenied.FullNatModeNotAllowed | The operation is not allowed because of FullNatModeNotAllowed. | 操作被拒绝,原因是不支持FullNat模式。 |
| 400 | SpecNotSupportParameter | The instance with share spec does not support FullNatEnabled parameter. | 共享型实例不支持FullNatEnabled参数。 |
| 400 | Abs.VServerGroupIdAndMasterSlaveServerGroupId.MissMatch | Virtual service group ID or master slave server group ID is missing. Please check the input parameters. | 虚拟服务组ID或者主备服务器组ID缺失,请检查输入参数。 |
| 400 | AclListenerOverLimit | This acl has reached the limit of binding to listeners. | 指定Acl可关联监听数量已达到配额上限。 |
| 400 | QuotaLimitExceeds.AclAttachedToListener | The number of Acl bound listeners has reached the quota limit | Acl绑定监听数已达到配额上限。 |
| 400 | QuotaLimitExceeds.TotalAclEntry | The number of Acl entries has reached the quota limit. | Acl条目数已达到配额上限。 |
| 400 | QuotaLimitExceeds.AclListenerOverLimit | This acl has reached the limit of binding to listeners. | 指定Acl可关联监听数量已达到配额上限。 |
| 403 | UnauthorizedRegion | The specified region of is not authorized. | 指定地域不可见。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。