1. 接口描述
调用本接口用于在网络型负载均衡实例中创建TCP、UDP或TCPSSL监听。
2. 请求参数
以下请求参数列表仅列出了接口中需要的请求参数
3. 响应结果
4. 代码示例
POST /api/v2/bmc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: CreateListener
<Common Request Params>
Request:
{
"loadBalancerId": "xxxx",
"name": "xxxx",
"portList": [80],
"clientToken": "xxxx",
"protocol": "TCP",
"backendProtocol": "TCP"
}
Response:
{
"requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
"response": {
"requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
"listenerId": "xxxx"
}
}
5. 开发者工具
Zenlayer Cloud API 2.0 提供了配套的开发工具集(SDK),未来会陆续支持更多开发语言,方便快速接入和使用Zenlayer的产品和服务。
6. 错误码
下面包含业务逻辑中遇到的错误码,其他错误码见公共错误码