POST zstack/v1/ipsec
Authorization: OAuth the-session-uuid
{
"params": {
"name": "Test-IPSec",
"l3NetworkUuid": "a4097ba23a7e38339029e1839bb415e1",
"peerAddress": "100.64.10.10",
"authMode": "psk",
"authKey": "auth",
"vipUuid": "cefa2f4e56ef33e496ccbb5879850f76",
"peerCidrs": [
"192.168.100.0/24"
],
"ikeAuthAlgorithm": "sha1",
"ikeEncryptionAlgorithm": "aes-128",
"ikeDhGroup": 2.0,
"policyAuthAlgorithm": "sha1",
"policyEncryptionAlgorithm": "aes-128",
"policyMode": "tunnel",
"transformProtocol": "esp"
},
"systemTags": [],
"userTags": []
}
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"name":"Test-IPSec","l3NetworkUuid":"a4097ba23a7e38339029e1839bb415e1","peerAddress":"100.64.10.10","authMode":"psk","authKey":"auth","vipUuid":"cefa2f4e56ef33e496ccbb5879850f76","peerCidrs":["192.168.100.0/24"],"ikeAuthAlgorithm":"sha1","ikeEncryptionAlgorithm":"aes-128","ikeDhGroup":2.0,"policyAuthAlgorithm":"sha1","policyEncryptionAlgorithm":"aes-128","policyMode":"tunnel","transformProtocol":"esp"}}' \
http://localhost:8080/zstack/v1/ipsec
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
name | String | body(包含在params结构中) | 资源名称 | 0.6 | |
description (可选) | String | body(包含在params结构中) | 资源的详细描述 | 0.6 | |
l3NetworkUuid (可选) | String | body(包含在params结构中) | 三层网络UUID | 2.3 | |
peerAddress | String | body(包含在params结构中) | 对端地址 | 0.6 | |
authMode (可选) | String | body(包含在params结构中) | 认证模式 |
| 0.6 |
authKey | String | body(包含在params结构中) | 认证密钥 | 0.6 | |
vipUuid | String | body(包含在params结构中) | VIP UUID | 0.6 | |
peerCidrs (可选) | List | body(包含在params结构中) | 对端CIDR | 2.3 | |
ikeAuthAlgorithm (可选) | String | body(包含在params结构中) | IKE验证算法 |
| 0.6 |
ikeEncryptionAlgorithm (可选) | String | body(包含在params结构中) | IKE加密算法 |
| 0.6 |
ikeDhGroup (可选) | int | body(包含在params结构中) | IKE完整前向保密 | 0.6 | |
policyAuthAlgorithm (可选) | String | body(包含在params结构中) | ESP认证算法 |
| 0.6 |
policyEncryptionAlgorithm (可选) | String | body(包含在params结构中) | ESP加密算法 |
| 0.6 |
pfs (可选) | String | body(包含在params结构中) | 完全正向保密 |
| 0.6 |
policyMode (可选) | String | body(包含在params结构中) | 工作模式 |
| 0.6 |
transformProtocol (可选) | String | body(包含在params结构中) | 传输安全协议 |
| 0.6 |
resourceUuid (可选) | String | body(包含在params结构中) | 资源UUID | 0.6 | |
systemTags (可选) | List | body | 系统标签 | 0.6 | |
userTags (可选) | List | body | 用户标签 | 0.6 |
{
"inventory": {
"name": "Test-IPSec",
"peerAddress": "100.64.10.10",
"authKey": "auth",
"vipUuid": "f368016d45f73360a8a8cd3ecbf9efb3",
"peerCidrs": [
{
"uuid": "199b04405d1e3fef83fd67a7a1f77bb3",
"cidr": "192.168.100.0/24",
"connectionUuid": "6deaa1c0ffd43f8eb3ebe2e8e7e66811",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"l3NetworkRefs": [
{}
]
}
}
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 0.6 |
inventory | IPsecConnectionInventory | 详情参考inventory | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 0.6 |
description | String | 错误的概要描述 | 0.6 |
details | String | 错误的详细信息 | 0.6 |
elaboration | String | 保留字段,默认为null | 0.6 |
opaque | LinkedHashMap | 保留字段,默认为null | 0.6 |
cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 0.6 |
name | String | 资源名称 | 0.6 |
description | String | 资源的详细描述 | 0.6 |
peerAddress | String | 0.6 | |
authMode | String | 0.6 | |
authKey | String | 0.6 | |
vipUuid | String | VIP UUID | 0.6 |
ikeAuthAlgorithm | String | 0.6 | |
ikeEncryptionAlgorithm | String | 0.6 | |
ikeDhGroup | Integer | 0.6 | |
policyAuthAlgorithm | String | 0.6 | |
policyEncryptionAlgorithm | String | 0.6 | |
pfs | String | 0.6 | |
policyMode | String | 0.6 | |
transformProtocol | String | 0.6 | |
state | String | 0.6 | |
status | String | 0.6 | |
createDate | Timestamp | 创建时间 | 0.6 |
lastOpDate | Timestamp | 最后一次修改时间 | 0.6 |
peerCidrs | List | 详情参考peerCidrs | 0.6 |
l3NetworkRefs | List | 详情参考l3NetworkRefs | 2.3 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 0.6 |
cidr | String | 0.6 | |
connectionUuid | String | 0.6 | |
createDate | Timestamp | 创建时间 | 0.6 |
lastOpDate | Timestamp | 最后一次修改时间 | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 2.3 |
connectionUuid | String | 2.3 | |
l3NetworkUuid | String | 三层网络UUID | 2.3 |
createDate | Timestamp | 创建时间 | 2.3 |
lastOpDate | Timestamp | 最后一次修改时间 | 2.3 |
CreateIPsecConnectionAction action = new CreateIPsecConnectionAction();
action.name = "Test-IPSec";
action.l3NetworkUuid = "a4097ba23a7e38339029e1839bb415e1";
action.peerAddress = "100.64.10.10";
action.authMode = "psk";
action.authKey = "auth";
action.vipUuid = "cefa2f4e56ef33e496ccbb5879850f76";
action.peerCidrs = asList("192.168.100.0/24");
action.ikeAuthAlgorithm = "sha1";
action.ikeEncryptionAlgorithm = "aes-128";
action.ikeDhGroup = 2.0;
action.policyAuthAlgorithm = "sha1";
action.policyEncryptionAlgorithm = "aes-128";
action.policyMode = "tunnel";
action.transformProtocol = "esp";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateIPsecConnectionAction.Result res = action.call();
CreateIPsecConnectionAction action = CreateIPsecConnectionAction()
action.name = "Test-IPSec"
action.l3NetworkUuid = "a4097ba23a7e38339029e1839bb415e1"
action.peerAddress = "100.64.10.10"
action.authMode = "psk"
action.authKey = "auth"
action.vipUuid = "cefa2f4e56ef33e496ccbb5879850f76"
action.peerCidrs = [192.168.100.0/24]
action.ikeAuthAlgorithm = "sha1"
action.ikeEncryptionAlgorithm = "aes-128"
action.ikeDhGroup = 2.0
action.policyAuthAlgorithm = "sha1"
action.policyEncryptionAlgorithm = "aes-128"
action.policyMode = "tunnel"
action.transformProtocol = "esp"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateIPsecConnectionAction.Result res = action.call()
DELETE/v1/ipsec/{uuid}?deleteMode={deleteMode}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 7a0f46ecc5c841eeb833dc5d3320f320" \
-X DELETE http://localhost:8080/zstack/v1/ipsec/2129331f3b7d4dbfb78f1751f6b47957?deleteMode=Permissive
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
uuid | String | url | 资源的UUID,唯一标示该资源 | 0.6 | |
deleteMode (可选) | String | url | 删除模式 | 0.6 | |
systemTags (可选) | List | body | 系统标签 | 0.6 | |
userTags (可选) | List | body | 用户标签 | 0.6 |
{}
,出错时返回的JSON结构包含一个error字段,例如:{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
DeleteIPsecConnectionAction action = new DeleteIPsecConnectionAction();
action.uuid = "2935596566fa421f833a801d501dbb53";
action.deleteMode = "Permissive";
action.sessionId = "7392673bd2244ad2a63280e81f9a7014";
DeleteIPsecConnectionAction.Result res = action.call();
DeleteIPsecConnectionAction action = DeleteIPsecConnectionAction()
action.uuid = "808078c31bdd499591bc009b8ae3446f"
action.deleteMode = "Permissive"
action.sessionId = "fcafdabd9a5e47c5ae7ff92c121173f9"
DeleteIPsecConnectionAction.Result res = action.call()
PUT zstack/v1/ipsec/{uuid}
Authorization: OAuth the-session-uuid
{
"updateIPsecConnection": {
"name": "test Ipsec",
"description": "info",
"deleteMode": "Permissive"
},
"systemTags": [],
"userTags": []
}
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 4dca24d8fce24355a048290b7adf5889" \
-X PUT -d '{"updateIPsecConnection":{"name":"test Ipsec","description":"info"}}' \
http://localhost:8080/zstack/v1/ipsec/1bcf0b898cf33f05b29edeb54a87ed82
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
uuid | String | url | 资源的UUID,唯一标示该资源 | 0.6 | |
name (可选) | String | body(包含在updateIPsecConnection结构中) | 资源名称 | 0.6 | |
description (可选) | String | body(包含在updateIPsecConnection结构中) | 资源的详细描述 | 0.6 | |
deleteMode (可选) | String | body(包含在updateIPsecConnection结构中) | 0.6 | ||
systemTags (可选) | List | body | 0.6 | ||
userTags (可选) | List | body | 0.6 |
返回示例
{
"inventory": {
"name": "Test-IPSec",
"description": "desc info ",
"peerAddress": "100.64.10.10",
"authKey": "auth",
"vipUuid": "8db7a95857db4771b309933783a6975e",
"peerCidrs": [
{
"uuid": "c58723c6002240f9a57c6e47b3e3f11c",
"cidr": "192.168.100.0/24",
"connectionUuid": "d58eaa352bf74465ac18e6a86d89298e",
"createDate": "Sep 22, 2017 12:24:59 PM",
"lastOpDate": "Sep 22, 2017 12:24:59 PM"
}
],
"l3NetworkRefs": [
{}
]
}
}
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 0.6 |
inventory | IPsecConnectionInventory | 详情参考inventory | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 0.6 |
description | String | 错误的概要描述 | 0.6 |
details | String | 错误的详细信息 | 0.6 |
elaboration | String | 保留字段,默认为null | 0.6 |
opaque | LinkedHashMap | 保留字段,默认为null | 0.6 |
cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 0.6 |
name | String | 资源名称 | 0.6 |
description | String | 资源的详细描述 | 0.6 |
peerAddress | String | 0.6 | |
authMode | String | 0.6 | |
authKey | String | 0.6 | |
vipUuid | String | VIP UUID | 0.6 |
ikeAuthAlgorithm | String | 0.6 | |
ikeEncryptionAlgorithm | String | 0.6 | |
ikeDhGroup | Integer | 0.6 | |
policyAuthAlgorithm | String | 0.6 | |
policyEncryptionAlgorithm | String | 0.6 | |
pfs | String | 0.6 | |
policyMode | String | 0.6 | |
transformProtocol | String | 0.6 | |
state | String | 0.6 | |
status | String | 0.6 | |
createDate | Timestamp | 创建时间 | 0.6 |
lastOpDate | Timestamp | 最后一次修改时间 | 0.6 |
peerCidrs | List | 详情参考peerCidrs | 0.6 |
l3NetworkRefs | |List| | 详情参考l3NetworkRefs | 2.3 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 0.6 |
cidr | String | 0.6 | |
connectionUuid | String | 0.6 | |
createDate | Timestamp | 创建时间 | 0.6 |
lastOpDate | Timestamp | 最后一次修改时间 | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 2.3 |
connectionUuid | String | 2.3 | |
l3NetworkUuid | String | 三层网络UUID | 2.3 |
createDate | Timestamp | 创建时间 | 2.3 |
lastOpDate | Timestamp | 最后一次修改时间 | 2.3 |
UpdateIPsecConnectionAction action = new UpdateIPsecConnectionAction();
action.uuid = "cedcb7a02f1548cbb8a68665cab0b191";
action.name = "test Ipsec";
action.description = "info";
action.deleteMode = "Permissive";
action.sessionId = "4e74102f098948cf97781ee6604b1571";
UpdateIPsecConnectionAction.Result res = action.call();
UpdateIPsecConnectionAction action = UpdateIPsecConnectionAction()
action.uuid = "dba5bbf127124fe2a3def62bcb96743d"
action.name = "test Ipsec"
action.description = "info"
action.deleteMode = "Permissive"
action.sessionId = "cc93dbb3278c4a699f2f1635eb756caf"
UpdateIPsecConnectionAction.Result res = action.call()
学习路径
ZStack Cloud 产品学习路径
快速梳理文档,点击相应文本链接,快速跳转到相应文档的页面,学习 ZStack Cloud 产品。
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io下载链接已发送至您的邮箱。
如未收到,请查看您的垃圾邮件、订阅邮件、广告邮件。 当您收到电子邮件后,请点击 URL 链接,以完成下载。感谢您使用 ZStack 产品和服务。
成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。
立即体验
联系我们
回到顶部
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。