CreateLoadBalancerUDPListener - 创建UDP监听
创建UDP监听。
接口说明
新建的监听的状态为 stopped。创建完成后,调用 StartLoadBalancerListener 接口启动监听来转发流量。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
slb:CreateLoadBalancerUDPListener |
create |
*acl
*loadbalancer
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
否 |
传统型负载均衡实例的地域 ID。 |
cn-hangzhou |
| Tag |
array<object> |
否 |
监听的标签集合。 |
|
|
object |
否 |
监听的标签集合。 |
||
| Key |
string |
否 |
监听的标签键。N 的取值范围:1~20。一旦传入该值,则不允许为空字符串。最多支持 128 个字符,不能以 |
TestKey |
| Value |
string |
否 |
监听的标签值。N 的取值范围:1~20。一旦传入该值,可以为空字符串。最多支持 128 个字符,不能以 |
TestValue |
| LoadBalancerId |
string |
是 |
传统型负载均衡实例的 ID。 |
lb-bp1ygod3yctvg1y7**** |
| ListenerPort |
integer |
是 |
传统型负载均衡实例前端使用的端口。 取值范围:1~65535。 |
80 |
| BackendServerPort |
integer |
否 |
传统型负载均衡实例后端使用的端口。 取值范围:1~65535。 如果不使用虚拟服务器组(不指定 VServerGroupId),则该参数必选。 |
80 |
| Bandwidth |
integer |
是 |
监听的带宽峰值。单位:Mbps。取值:
|
-1 |
| Scheduler |
string |
否 |
调度算法。取值:
仅性能保障型实例支持 sch、 tch 和 qch 一致性 hash 算法。 |
wrr |
| HealthyThreshold |
integer |
否 |
健康检查连续成功多少次后,将后端服务器的健康检查状态由 fail 判定为 success。 取值范围:2~10。 |
4 |
| UnhealthyThreshold |
integer |
否 |
健康检查连续失败多少次后,将后端服务器的健康检查状态由 success 判定为 fail。 取值范围:2~10。 |
4 |
| HealthCheckConnectTimeout |
integer |
否 |
接收来自运行状况检查的响应需要等待的时间。 如果后端 ECS 在指定的时间内没有正确响应,则判定为健康检查失败。单位:秒。 取值范围:1~300。 |
100 |
| HealthCheckConnectPort |
integer |
否 |
健康检查使用的端口。 取值范围:1~65535。 不设置此参数时,表示使用后端服务端口(BackendServerPort)。 |
80 |
| healthCheckInterval |
integer |
否 |
健康检查的时间间隔。单位:秒。 取值范围:1~50。 |
3 |
| healthCheckReq |
string |
否 |
UDP 监听健康检查的请求字符串,只允许包含字母、数字,最大长度限制为 64 个字符。 |
hello |
| healthCheckExp |
string |
否 |
UDP 监听健康检查的响应字符串,只允许包含字母、数字,最大长度限制为 64 个字符。 |
ok |
| VServerGroupId |
string |
否 |
虚拟服务器组 ID。 |
rsp-cige6j8**** |
| MasterSlaveServerGroupId |
string |
否 |
主备服务器组 ID。 说明
虚拟服务器组 ID 和主备服务器组 ID 只能选择一个。 |
rsp-0bfucwu**** |
| AclId |
string |
否 |
监听绑定的访问策略组 ID。 当 AclStatus 参数的值为 on 时,该参数必选。 |
acl-uf60jw*** |
| 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。 |
06F00FBB-3D9E-4CCE-9D43-1A6946A75556 |
示例
正常返回示例
JSON格式
{
"RequestId": "06F00FBB-3D9E-4CCE-9D43-1A6946A75556"
}
错误码
|
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 | Abs.VServerGroupIdAndMasterSlaveServerGroupId.MissMatch | The parameters VServerGroupId or MasterSlaveServerGroupId miss match. | |
| 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 | ListenerProcessing | A previous configuration of the listener is pending,please try again later. | 当前监听正在配置中,请稍后重试。 |
| 400 | AclNotExist | Acl does not exist. | 指定的Acl不存在。 |
| 400 | InvalidParameter.ListenerPortConflict | There is conflict listener port exists. | 指定的监听端口已存在。 |
| 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 | Duplicated.AclEntry | %s. | %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. | 指定的实例不支持创建tcpssl类型的监听。 |
| 400 | LbSupportTcpsslOnly | The specified load balancer supports TCP SSL type listener only. | 指定的实例只支持创建tcpssl类型的监听。 |
| 400 | ListenerNotSupportRule | You cannot create a rule for the specified listener. | 指定的监听不支持创建转发规则。 |
| 400 | InvalidParamLength.HealthCheckExp | The length of the parameter HealthCheckReq is invalid. | 指定的HealthCheckExp无效。请检查参数约束,并在修改后重试。 |
| 400 | InvalidParamLength.HealthCheckReq | The length of the parameter HealthCheckReq is invalid. | 指定的HealthCheckReq无效。请检查参数约束,并在修改后重试。 |
| 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 | VipNotSupportQuicVersion | The listener does not support the parameter of QuicVersion. | 当前监听不支持QuicVersion参数。 |
| 400 | IllegalParam.HealthCheckType | The param of HealthCheckType is illegal. | 指定的HealthCheckType无效。请检查参数约束,并在修改后重试。 |
| 400 | MissingParam.HealthCheckMethod | The param of HealthCheckMethod is missing. | 参数HealthCheckMethod缺失。 |
| 400 | IllegalParam.HealthCheckMethod | The param of HealthCheckMethod is illegal. | 指定的HealthCheckMethod无效。请检查参数约束,并在修改后重试。 |
| 400 | IllegalParam.HealthCheck | The param of HealthCheck is illegal. | 指定的HealthCheck无效。请检查参数约束,并在修改后重试。 |
| 400 | OperationDenied.SpecialListenerPortNotAllowed | The operation is not allowed because port 4789 is reserved by the system. | 操作被拒绝,原因是4789是系统保留端口。 |
| 400 | Mismatch.SlbSpecTypeAndListenerProtocol | The SlbSpecType and ListenerProtocol are mismatched. | 实例规格类型和监听类型不匹配。 |
| 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 | InvalidParam.TagValue | %s. | |
| 400 | InvalidParam.TagKey | %s. | |
| 400 | SizeLimitExceeded.Tag | %s. | |
| 400 | MissingParam.TagKey | The param MissingParam.TagKey is missing. | |
| 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可关联监听数量已达到配额上限。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。