名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
id | int | 防火墙ID | |
nodeid | int | 数据中心ID | |
page | int | 页码 | |
limit | int | 每页数量 |
curl -i -X POST https://api3.verycloud.cn/API/instance/firewallList -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "limit": 30, "page": 1}'
{
"code": 1,
"message": "操作完成",
"data": [
{
"id": "1234589677",
"firewall_id": "sg_gzrc15fz",
"name": "测试名称",
"uid": "6894123455",
"username": "example_user",
"node": {
"id": "1234567890",
"areaname": "江阴1区"
},
"note": "备注",
"num": "0",
"createtime": "2015/03/18 12:01",
"createtime_ago": "22小时前",
"updatetime": "2015/03/18 12:01"
}
],
"limit": 30,
"page": 1,
"total": 1,
"totalpage": 1
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
nodeid | int | 数据中心ID | |
name | string | 名称 | |
note | string | 备注 |
curl -i -X POST https://api3.verycloud.cn/API/instance/firewallAdd -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "nodeid": 1234567890, "name": "测试", "note": "备注"}'
{
"code": 1,
"message": "操作完成",
"data": {
"id": "1234589677",
"nodeid": "1234567890",
"name": "测试",
"note": "备注",
"createtime": "1426732269",
"firewall_id": "sg_spekmw4r"
}
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
id | int | 防火墙ID | |
name | string | 名称 | |
note | string | 备注 |
curl -i -X POST https://api3.verycloud.cn/API/instance/firewallUpdate -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890, "name": "测试更新", "note": "备注"}'
{
"code": 1,
"message": "操作完成",
"data": {
"id": "1234589677",
"nodeid": "1234567890",
"name": "测试更新",
"note": "备注",
"createtime": "1426732269",
"firewall_id": "sg_spekmw4r"
}
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
id | int | 防火墙ID |
curl -i -X POST https://api3.verycloud.cn/API/instance/firewallDelete -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890}'
{
"code": 1,
"message": "操作完成",
"data": {
"firewall_id": "sg_gzrc15fz",
"name": "测试"
}
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
fid | int | 防火墙ID | |
iid | int | 云主机ID |
curl -i -X POST https://api3.verycloud.cn/API/instance/joinFirewall -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "fid": 1234567890, "iid": 1234567890}'
{
"code": 1,
"message": "操作完成",
"data": {
"firewall_id": "sg_spekmw4r",
"name": "测试",
"instance_id": "i-230x2mmn"
}
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
id | int | 云主机ID |
curl -i -X POST https://api3.verycloud.cn/API/instance/leaveFirewall -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890}'
{
"code": 1,
"message": "操作完成",
"data": {
"firewall_id": "sg_spekmw4r",
"name": "测试",
"instance_id": "i-230x2mmn"
}
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
id | int | 防火墙规则ID | |
fid | int | 防火墙ID | |
direction | string | 方向 in 下行 out 上行 | |
status | int | 状态 0 禁用 1 开启 | |
page | int | 页码 | |
limit | int | 每页数量 |
curl -i -X POST https://api3.verycloud.cn/API/instance/firewallRuleList -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60","fid": 7012345896, "limit": 30, "page": 1}'
{
"code": 1,
"message": "操作完成",
"data": [
{
"id": "4151234568",
"fid": "7012345896",
"direction": "out",
"action": "ACCEPT",
"protocol": "tcp",
"sourceport": "",
"destport": "",
"source": "",
"destination": "",
"status": "1",
"note": "",
"createtime": "2015/03/16 20:36",
"updatetime": "2015/03/16 20:36"
}
],
"limit": 30,
"page": 1,
"totalpage": 1,
"total": 1,
"created": "2015年03月19日 10:48:18"
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
fid | int | 防火墙ID | |
direction | string | 方向 in 下行 out 上行 默认下行 | |
action | string | 行为 ACCEPT 接受 REJECT 拒绝 默认接受 | |
protocol | string | 协议 tcp udp等 默认tcp | |
sourceport | int | 源端口 | |
destport | string | 目的端口 | |
source | string | 源IP | |
destination | string | 目的IP | |
status | int | 状态 0 禁用 1 开启 默认开启 | |
note | string | 备注 |
curl -i -X POST https://api3.verycloud.cn/API/instance/firewallRuleAdd -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "fid": 1234567890, "direction": "out", "action": "REJECT", "protocol": "udp"}'
{
"code": 1,
"message": "操作完成",
"data": {
"firewall_id": "sg_k05bdouz",
"direction": "out",
"action": "REJECT",
"protocol": "udp",
"sourceport": 0,
"destport": 0,
"source": "",
"destination": "",
"status": 1,
"note": ""
}
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
id | int | 防火墙规则ID | |
direction | string | 方向 in 下行 out 上行 默认下行 | |
action | string | 行为 ACCEPT 接受 REJECT 拒绝 默认接受 | |
protocol | string | 协议 tcp udp等 默认tcp | |
sourceport | int | 源端口 | |
destport | string | 目的端口 | |
source | string | 源IP | |
destination | string | 目的IP | |
status | int | 状态 0 禁用 1 开启 默认开启 | |
note | string | 备注 |
curl -i -X POST https://api3.verycloud.cn/API/instance/firewallRuleUpdate -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890, "direction": "out", "action": "REJECT", "protocol": "udp"}'
{
"code": 1,
"message": "操作完成",
"data": {
"id": "1234567890",
"fid": "1234567890",
"direction": "out",
"action": "REJECT",
"protocol": "udp",
"sourceport": "0",
"destport": "0",
"source": "",
"destination": "",
"status": "1",
"note": "",
"seq": "0",
"createtime": "1426733822",
"updatetime": "1426733822",
"firewall_id": "sg_k05bdouz"
}
}
名称 | 类型 | 必须 | 说明 |
---|---|---|---|
token | string | 密钥 | |
id | int | 防火墙规则ID |
curl -i -X POST https://api3.verycloud.cn/API/instance/firewallRuleDelete -H "Accept: application/json" -H "Content-Type: application/json; charset=utf-8" -d '{"token": "5d8531de68ae272eacb8670afe084d60", "id": 1234567890}'
{
"code": 1,
"message": "操作完成",
"data": {
"id": "1234567890",
"fid": "1234567890",
"direction": "out",
"action": "ACCEPT",
"protocol": "tcp",
"sourceport": "0",
"destport": "0",
"source": "",
"destination": "",
"status": "1",
"note": "",
"seq": "1",
"createtime": "1426733914",
"updatetime": "1426733914",
"firewall_id": "sg_k05bdouz"
}
}