修改监听设置
更新时间:2020-07-10
接口描述
修改监听设置。
请求结构
PUT /v1/blb/{blbId}/monitor HTTP/1.1
Host: bec.baidubce.com
Content-Type: application/json; charset=utf-8
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
blbId | String | 是 | URI参数 | 负载均衡Id |
blbListenerRequest | BlbListenerRequest | 是 | RequestBody参数 | 修改负载均衡监听设置请求 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
无
错误码
请参照错误返回章节的内容。
请求示例
PUT /v1/blb/lb-0sbwulxb/monitor HTTP/1.1
Host: bec.baidubce.com
Content-Type: application/json; charset=utf-8
Authorization: bce-auth-v1/318857a8f08b11e9845ca7e54775a0c2/2019-10-17T03:07:21Z/1800/host/212eef8cfe1ac94be56c4afedb9360bba621ef646c3c8288971d36801d70501a
content示例:
{
"frontendPort":
{
"protocol":"TCP",
"port":8090
},
"backendPort":80,
"lbMode":"wrr",
"timeoutInSeconds":1,
"healthCheck":
{
"timeoutInSeconds":2,
"intervalInSeconds":2,
"unhealthyThreshold":3,
"healthyThreshold":4,
"healthCheckString":"udp",
"retry":3
}
}
响应示例
无
Model对象定义
BlbListenerRequest
参数名称 | 类型 | 描述 |
---|---|---|
frontendPort | Port | 负载均衡端口 |
backendPort | int | 后端端口 |
lbMode | LbMode | 转发规则 |
healthCheck | HealthCheck | 健康检查设置 |
Port
参数名称 | 类型 | 描述 |
---|---|---|
protocol | Protocol | 使用协议名称 |
port | int | 端口号 |
Protocol
枚举名称 | 描述 |
---|---|
TCP | TCP协议 |
UDP | UDP协议 |
HTTP | HTTP协议 |
HTTPS | HTTPS协议 |
SSL | SSL协议 |
HealthCheck
参数名称 | 类型 | 描述 |
---|---|---|
timeoutInSeconds | int | 响应超时时间 |
intervalInSeconds | int | 健康检查时间 |
unhealthyThreshold | int | 不健康阈值 |
healthyThreshold | int | 健康阈值 |
healthCheckString | String | UDP检查字符串 |