CreateLoadBalancerTCPListener_负载均衡_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

说明 新建的监听的状态为 stopped。创建完成后,调用 StartLoadBalancerListener 接口启动监听来转发流量。

流控信息

请求速率为90/60(s)。更多流控信息,请前往配额中心查看

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
slb:CreateLoadBalancerTCPListener
Create
AccessControlList
acs:slb:{#regionId}:{#accountId}:acl/{#AclId}
LoadBalancer
acs:slb:{#regionId}:{#accountId}:loadbalancer/{#LoadBalancerId}
slb:tag
slb:tag
slb:tag

请求参数

字段名称字段详情
RegionIdstring

传统型负载均衡实例的地域 ID。展开详情

示例值:cn-hangzhou参考取值来源:
    DescribeRegions
LoadBalancerIdstring

传统型负载均衡实例的 ID。

示例值:lb-bp1b6c719dfa08ex****参考取值来源:
    CreateLoadBalancer
    DescribeLoadBalancers
ListenerPortinteger<int32>

传统型负载均衡实例前端使用的端口。展开详情

示例值:80取值 <= 65535
BackendServerPortinteger<int32>

传统型负载均衡实例后端使用的端口。展开详情

示例值:80取值 <= 65535
Tagarray<object>

标签列表。

子级条数 <= 20
Bandwidthinteger<int32>

监听的带宽峰值,单位:Mbps。取值:展开详情

示例值:-1取值 <= 5120
Schedulerstring

调度算法。取值:展开详情

示例值:wrr
PersistenceTimeoutinteger<int32>

会话保持的超时时间。单位:秒。展开详情

示例值:0取值 <= 3600
EstablishedTimeoutinteger<int32>

连接超时时间。单位:秒。展开详情

示例值:500取值 <= 900
HealthyThresholdinteger<int32>

健康检查连续成功多少次后,将后端服务器的健康检查状态由 fail 判定为 success展开详情

示例值:4取值 <= 10
UnhealthyThresholdinteger<int32>

健康检查连续失败多少次后,将后端服务器的健康检查状态由 success 判定为 fail展开详情

示例值:4取值 <= 10
HealthCheckConnectTimeoutinteger<int32>

每次健康检查响应的最大超时时间。单位:秒。展开详情

示例值:100取值 <= 300
HealthCheckConnectPortinteger<int32>

健康检查使用的端口。展开详情

示例值:80取值 <= 65535
healthCheckIntervalinteger<int32>

健康检查的时间间隔。单位:秒。展开详情

示例值:3取值 <= 50
HealthCheckDomainstring

用于健康检查的域名。取值:展开详情

示例值:172.XX.XX.6
HealthCheckURIstring

用于健康检查的 URI。长度限制为 1~80,只能使用字母、数字、短划线(-)、正斜线(/)、半角句号(.)、百分号(%)、井号(#)和 and(&)这些字符。 URI 不能只为正斜线(/),但必须以正斜线(/)开头。展开详情

示例值:/test/index.html
HealthCheckHttpCodestring

健康检查正常的 HTTP 状态码,多个状态码用半角逗号(,)分割。取值:展开详情

示例值:http_2xx,http_3xx
HealthCheckTypestring

健康检查类型。取值:展开详情

示例值:tcp
VServerGroupIdstring

虚拟服务器组 ID。

示例值:rsp-cige6j****参考取值来源:
    CreateVServerGroup
    DescribeVServerGroups
    SetVServerGroupAttribute
    AddVServerGroupBackendServers
    RemoveVServerGroupBackendServers
    ModifyVServerGroupBackendServers
MasterSlaveServerGroupIdstring

主备服务器组 ID。展开详情

示例值:rsp-0bfucw****参考取值来源:
    CreateMasterSlaveServerGroup
    DescribeMasterSlaveServerGroups
AclIdstring

监听绑定的访问策略组 ID。展开详情

示例值:acl-uf60jwfiv6******
AclTypestring

访问控制类型:展开详情

示例值:black
AclStatusstring

是否开启访问控制功能。取值:展开详情

示例值:off
Descriptionstring

自定义监听名称。展开详情

示例值:tcp_80
ConnectionDrainstring

是否开启连接优雅中断。取值:展开详情

示例值:off
ConnectionDrainTimeoutinteger<int32>

设置连接优雅中断超时时间。单位:秒。展开详情

示例值:300
ProxyProtocolV2Enabledboolean

是否支持通过 Proxy Protocol 协议携带客户端源地址到后端服务器。取值:展开详情

示例值:false
HealthCheckSwitchstring

是否开启健康检查。取值:展开详情

示例值:on

返回参数

字段名称字段详情
RequestIdstring

请求 ID。

示例值:CEF72CEB-54B6-4AE8-B225-F876FF7BA984

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
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
InvalidParameter.ZoneNotSupport
The zone does not support the parameter %s.诊断
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
Duplicated.AclEntry
%s.诊断
400
OperationUnsupported.SetAccessControl
The singleTunnel/anyTunnel loadbalancer does not support config AccessControlList.诊断
400
InvalidParam.PortRange
The specified PortRange is invalid.诊断
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.诊断
400
ListenerPortConflict
The specified ListenerPort is conflict with other listener.诊断
400
ResourceNotFound.VServerGroup
%s.诊断
400
IllegalParam.FailoverThreshold
The parameter FailoverThreshold is illegal.诊断
400
IllegalParam.FailoverStrategy
The parameter FailoverStrategy is illegal.诊断
400
MasterSlaveServerConflict
The servers are conflict for MasterSlaveGroup.诊断
400
OperationDenied.HealthCheckClosedForMasterSlaveMode
The operation is denied because of HealthCheckClosedForMasterSlaveMode.诊断
400
IllegalParam.HealthCheck
The param of HelathCheck is illegal.诊断
400
Mismatch.SlbSpecTypeAndListenerProtocol
The SlbSpecType and ListenerProtocol are mismatched.诊断
400
OperationDenied.FullNatModeNotAllowed
The operation is not allowed because of FullNatModeNotAllowed.诊断
400
OperationDenied.OnlyIpv4SlbSupport
The operation is not allowed because of OnlyIpv4SlbSupport.诊断
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.诊断
400
MissingParameter
The BackendServerPort or VServerGroupId is required at lease one.诊断
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.诊断

变更历史

变更时间变更内容概要操作
2025-02-11
变更错误码400
2025-01-08
变更错误码400
2024-12-27
变更请求参数BackendServerPort
2024-11-15
新增OpenAPI,创建TCP监听
2023-09-08
变更错误码400
2023-06-02
变更请求参数Tag
2022-10-11
新增请求参数HealthCheckSwitch

相关示例

创建负载均衡并为创建的负载均衡创建监控规则
2021-02-13
创建UDP/TCP/HTTP/HTTPS监听、查询和修改监听的配置
2021-11-16