LBAddVip【新建VIP】¶
新建负载均衡资源池的虚拟服务地址(VIP):新建VIP过程可配置VIP的IP地址,协议及协议端口、会话持久性方法、连接数限制,如果不指定必要新建条件,则会返回错误信息。
Request Parameters
Parameter name | Type | Description | Required |
---|---|---|---|
action | String | API 标识符 | Yes |
pool_id | String | 资源池ID | Yes |
name | String | VIP名称 | Yes |
description | String | VIP描述 | No |
floatip_address | String | 浮动IP地址 | No |
other_address | String | VIP内网IP地址 | Yes |
protocol_port | String | 协议端口 | Yes |
protocol | String | 协议类型,有TCP,HTTP,HTTPS | Yes |
session_persistence | String | 会话持久性策略,有SOURCE_IP,HTTP_COOKIE,APP_COOKIE和空值 | Yes |
cookie_name | String | COOKIE名称 | Yes |
connection_limit | String | 连接数限制 | Yes |
admin_state_up | Integer | 管理员状态(默认为1) | Yes |
Response Elements
Name | Type | Description |
---|---|---|
message | String | 执行结果信息 |
code | Integer | HTTP Resonpe响应状态码 |
Example
Example Request:
Request Headers:
POST /api/ HTTP/1.1
Origin: https://console.plcloud.com
X-CSRFToken: 6An6xEuOJqW6dVDtlgzZr6FqgkSbJmqp
Content-Type: application/json
JSON Data:
{
"action": "LBAddVip",
"pool_id": "143b4103-f5f5-4456-9b60-28ff891a66fa",
"name": "VIP",
"description": "test",
"floatip_address": "",
"other_address": "192.168.100.159",
"protocol_port": "80",
"protocol": "HTTP",
"session_persistence": "HTTP_COOKIE",
"cookie_name": "",
"connection_limit": "100",
"admin_state_up": 1
}
Example Response:
{
"message": "成功",
"code": 200
}