1. 接口描述
本接口(GetVpnConnConfig)用于下载VPN通道配置。 接口请求域名:vpc.api.qcloud.com
2. 输入参数
以下请求参数列表仅列出了接口请求参数,正式调用时需要加上公共请求参数,见公共请求参数页面。其中,此接口的Action字段为GetVpnConnConfig。
| 参数名称 | 必选 | 类型 | 描述 | 
|---|---|---|---|
| vpnConnId | 是 | String | 系统分配的VPN通道ID,可使用vpnConnId或unVpnConnId,建议使用unVpnConnId,例如:vpnx-ol6bcqp0。可通过 DescribeVpnConn 接口查询。 | 
| vendorname | 是 | string | 对端网关设备类型。 | 
| platform | 是 | String | 对端网关设备平台。 | 
| software | 是 | String | 对端网关设备软件版本。 | 
| interfaceName | 是 | String | 通道接入设备物理接口名称。 | 
3. 输出参数
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| code | Int | 错误码,0:成功,其他值:失败 | 
| message | String | 错误信息 | 
| data.configFileInfo | String | 配置文件内容 | 
4. 错误码表
该接口没有业务错误码,公共错误码详见公共错误码。
5. 示例
输入
  https://domain/v2/index.php?Action=GetVpnConnConfig
  &<公共请求参数>
  &vpnConnId=2
    &vendorname=cisco
    &platform=ios
    &software=V15.4
输出
{
    "code": 0,
    "message": "ok",
    "data": [{
        "configFileInfo": "ike keychain keychain1\r \n                 pre-shared-key address 65.0.0.21 key simple key123\r  \n                 quit\rike proposal 1\r \n                 encryption-algorithm aes-cbc-128\r \n                 authentication-algorithm md5\r \n                 dh group14\r sa Lifetime 60\r \n                 quit\rike profile profile1\r \n                 keychain keychain1\r \n                 local-identity fqdn remote1\r \n                 match remote identity fqdn local1\r \n                 exchange-mode aggressive\r \n                 quit\rike invalid-spi-recovery enable\ripsec transform-set transform-set1\r \n                 esp authentication-algorithm sha1\r \n                 esp encryption-algorithm aes-cbc-128\r \n                 pfs dh-group1\r \n                 quit\racl advanced 3001\r \n                 rule permit ip source 55.55.55.55 0.0.0.255 destination 11.11.11.11 0.0.0.255\r\n                 ipsec policy policy1 1 isakmp\r \n                 transform-set transform-set1\r \n                 security acl 3001\r \n                 remote-address 65.0.0.21\r \n                 ike-profile profile1\r \n                 sa Lifetime time-based 180\r \n                 sa Lifetime traffic-based 2560\r \n                 quit\rip unreachables enable\rinterface GigabitEthernet0/0\r \n                 port link-mode route\r \n                 ipsec apply policy policy1\r quit"
    }]
}