更新容器服务 k8s 应用的 SLB。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
PUT /pop/v5/k8s/acs/k8s_slb_binding HTTPS|HTTP
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
AppId | String | Query | 是 | 5a166fbd-****-****-a286-781659d9f54c |
应用 ID |
ClusterId | String | Query | 是 | 712082c3-****-****-9217-a947b5cde6ee |
集群 ID |
Type | String | Query | 是 | Internete |
设置 SLB 的类型,可选参数有:Internet(外网)、Intranet(内网) |
SlbProtocol | String | Query | 否 | TCP |
SLB 协议,目前仅支持 TCP,设置为 “TCP”。 |
TargetPort | String | Query | 否 | 8082 |
后端端口,也是应用的服务端口,范围 1~65535。 |
Port | String | Query | 否 | 80 |
前端端口,范围 1~65535 |
ServicePortInfos | String | Query | 否 | [{"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"136246975637380916c185d6fa21914500329_-xxxxxxx","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}] |
多个端口需求以及非TCP协议需求填写字段 必须符合JsonArray格式,参考示例: {"targetPort":8080,"port":82,"loadBalancerProtocol":"TCP"},{"port":81,"certId":"1362469756373809_16c185d6fa2_1914500329_-xxxxxxx","targetPort":8181,"lo adBalancerProtocol":"HTTPS"}
|
Specification | String | Query | 否 | slb.s1.small |
SLB规格,不填写则默认为:slb.s1.small 简约型。 目前SLB已经支持的规格和价格,请参见按量计费。 |
Scheduler | String | Query | 否 | wrr |
SLB调度算法。不填写则默认值为rr。支持负载均衡支持轮询 (rr)、加权轮询 (wr) 两种调度算法。
|
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ChangeOrderId | String | 9a1dcdee-****-****-ad37-cbf9dc91fba9 |
变更流程 ID |
Code | Integer | 200 |
code 码 |
Message | String | success |
信息 |
RequestId | String | 4823-bhjf-23u4-eiufh |
示例
请求示例
PUT /pop/v5/k8s/acs/k8s_slb_binding HTTP/1.1
公共请求头
{
"AppId": "5a166fbd-****-****-a286-781659d9f54c",
"ClusterId": "712082c3-****-****-9217-a947b5cde6ee",
"Type": "Internete"
}
正常返回示例
XML
格式
<Message>success</Message>
<RequestId/>
<ChangeOrderId>9a1dcdee-****-****-ad37-cbf9dc91fba9</ChangeOrderId>
<Code>200</Code>
JSON
格式
{
"Message": "success",
"RequestId": "",
"ChangeOrderId": "9a1dcdee-****-****-ad37-cbf9dc91fba9",
"Code": 200
}
错误码
访问错误中心查看更多错误码。