接口功能介绍
查询已创建的VPN连接策略
接口约束
支持主备模式资源池。
URI
GET /v4/vpn/connection/policy
路径参数
无
Query 参数
无
请求参数
请求头 header 参数
无
请求体 body 参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
regionID | 是 | String | 资源池ID | ||
vpnConnectionID | 是 | String | VPN连接 ID |
响应参数
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
statusCode | Integer | 返回状态码(800为成功,900为失败) | ||
message | String | 失败时的错误描述,一般为英文描述 | ||
description | String | 失败时的错误描述,一般为中文描述 | ||
returnObj | Object | 返回对象 | returnObj | |
errorCode | String | 业务细分码,为product.module.code三段式码 | ||
errorDetail | Object | 错误明细 |
表returnObj
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
currentCount | Interger | 当前返回连接策略数量 | ||
totalCount | Interger | 总共连接策略数量 | ||
results | Array of Object | VPN连接策略信息列表 | Policy | |
errorCode | String | 错误码 | ||
message | String | 错误信息 | ||
description | String | 描述 | ||
statusCode | String | 800成功,900失败 |
表Policy
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
ikePolicy | Object | IKE 策略 | IkePolicy | |
ipsecPolicy | Object | IPSec 策略 | IpsecPolicy |
表IkePolicy
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
authAlgorithm | String | IKE认证算法 | ||
encryptionAlgorithm | String | IKE加密算法 | ||
ikeVersion | String | IKE版本 | ||
lifetime | String | 生命周期 | ||
pfs | String | IKE DH算法 | ||
phase1NegotiationMode | String | 本参数表示协商模式。 取值范围: main mode aggressive mode |
表IpsecPolicy
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
transformProtocol | String | 传输协议 | ||
authAlgorithm | String | IPSEC认证算法 | ||
encryptionAlgorithm | String | IPSEC 加密算法 | ||
lifetime | String | IPSEC 生命周期 | ||
pfs | String | IPSEC DH算法 |
请求示例
请求头
无
请求体 body
{
"regionID": "81f7728662dd11ec810800155d307d5b",
"vpnConnectionID": "f2fb2320-d02d-11ec-8d53-0242ac110002"
}
响应示例
{
"returnObj": {
"currentCount": 1,
"totalCount": 1,
"results": [{
"ikePolicy": {
"lifetime": "61",
"ikeVersion": "v2",
"pfs": "Group14",
"authAlgorithm": "sha512",
"phase1NegotiationMode": null,
"encryptionAlgorithm": "AES-128"
},
"ipsecPolicy": {
"lifetime": "604799",
"encryptionAlgorithm": "3DES",
"pfs": "DH Group5",
"authAlgorithm": "sha512",
"transformProtocol": null
}
}]
},
"errorCode": "",
"message": "",
"description": "",
"statusCode": 800
}
状态码
状态码 | 描述 |
---|---|
800 | 表示请求成功 |
900 | 表示请求未成功 |
错误码
errorCode | 描述 |
---|---|
OPENAPI.PatternCheck.NotValid | 请求参数无效 |
OPENAPI.VPN.AccessFailed | 内部错误,请重试。如果多次尝试失败,请提交工单 |