更新负载均衡监听的属性。
接口说明
UpdateListenerAttribute 接口属于异步接口,即系统返回一个请求 ID,但该监听的配置尚未更新成功,系统后台的更新任务仍在进行。您可以调用 GetListenerAttribute 查询监听的配置的更新状态:
当监听器处于 Configuring 状态时,表示监听的配置正在更新中。
当监听器处于 Running 状态时,表示监听的配置更新成功。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
gwlb:UpdateListenerAttribute |
update |
*LoadBalancer
*Listener
ServerGroup
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
ListenerId |
string |
是 |
监听 ID。 |
lsn-lxce8iqbof2vl0**** |
ListenerDescription |
string |
否 |
自定义监听描述。 长度限制为 2~256 个字符,支持中文和英文字母,可包含数字、半角逗号(,)、半角句号(.)、半角分号(;)、正斜线(/)、at(@)、下划线(_)和短划线(-)。 |
listener_description |
ServerGroupId |
string |
否 |
服务器组 ID。 |
sgp-sp8d2r6y7t0xtl**** |
TcpIdleTimeout |
integer |
否 |
TCP 连接空闲超时时间。取值范围:60-6000 秒。 |
350 |
DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-42665544**** |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
请求的返回值。 |
||
RequestId |
string |
请求 ID。 |
7DBFC67C-A272-5952-8287-6C3EBE4E04D9 |
示例
正常返回示例
JSON
格式
{
"RequestId": "7DBFC67C-A272-5952-8287-6C3EBE4E04D9"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | IncorrectBusinessStatus.LoadBalancer | The business status of %s [%s] is incorrect. | 资源%s业务状态%s不支持当前操作 |
400 | IncorrectStatus.LoadBalancer | The status of %s [%s] is incorrect. | 资源%s当前状态%s不支持操作 |
400 | IncorrectStatus.Listener | The status of %s [%s] is incorrect. | 资源%s当前状态%s不支持操作。 |
400 | Mismatch.VpcId | The %s is mismatched for %s and %s. | 两个资源的VPC ID不匹配 |
400 | ResourceInUse.IP | The specified resource of IP is in use. | |
400 | IncorrectStatus.ServerGroup | The status of %s [%s] is incorrect. | 资源%s当前状态%s不支持操作 |
400 | OperationDenied.TcpIdleTimeoutConflictWithScheduler | The TCP idle timeout of listener must be default value when the scheduling algorithm of server group is not 5TCH. | 配置冲突,自定义配置了的TCP连接空闲超时时间,服务器组的调度算法需要使用五元组哈希。 |
400 | OperationDenied.TcpIdleTimeoutNotConfigurable | The TCP idle timeout of listener is configurable only when the scheduling algorithm of server group is 5TCH. | 当服务器组调度算法为五元组哈希时,可以自定义配置TCP连接空闲超时时间。其他调度算法,无法修改。 |
404 | ResourceNotFound.LoadBalancer | The specified resource of %s is not found. | 指定的负载均衡资源不存在 |
404 | ResourceNotFound.Listener | The specified resource of %s is not found. | 指定的监听资源不存在 |
404 | ResourceNotFound.ServerGroup | The specified resource of %s is not found. | 指定的服务器组资源不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。