虚拟专用网络 VPN-查询VPN网关列表:响应消息
响应消息
- 响应参数
表3 响应Body参数列表 名称
类型
描述
vpn_gateways
Array of ResponseVpnGateway objects
网关信息。
request_id
String
请求ID。
表4 ResponseVpnGateway 名称
类型
描述
id
String
- 功能说明:VPN网关ID。
- 格式:36位UUID。
name
String
- 功能说明:VPN网关名称。
- 取值范围:1-64个字符,支持数字、英文字母、中文(\u4e00 - \u9fa5)、_(下划线)、-(中划线)、.(点)。
network_type
String
- 功能说明:VPN网关网络类型。
- 取值范围:public,private。
- 默认值:public。
status
String
attachment_type
String
- 功能说明:关联模式。
- 取值范围:vpc,er。
certificate_id
String
- 功能说明:证书ID。
- 格式:36位UUID。
er_id
String
VPN网关所连接的ER实例的ID。仅当attachment_type为er时返回。
vpc_id
String
仅当attachment_type为vpc时返回,是VPN网关关联的业务VPC的ID。
local_subnets
Array of String
本端子网。本端子网是云上子网,该网段需要通过VPN与用户侧网络进行互通。单个网段格式示例:192.168.52.0/24。仅当attachment_type为vpc时返回。
connect_subnet
String
VPN网关所使用的VPC中的一个子网ID。
bgp_asn
Long
VPN网关的BGP自治域编号。
flavor
String
availability_zone_ids
Array of String
部署VPN网关的可用区。当指定了可用区时则返回;当未指定可用区时,在VPN网关的状态为ACTIVE时返回。
connection_number
Integer
VPN网关下的最大VPN连接数。
used_connection_number
Integer
VPN网关下当前已经使用的VPN连接数。
used_connection_group
Integer
VPN网关下当前已经使用的VPN连接组个数。同一用户网关入云的两条连接组成一个连接组。VPN网关默认支持10个免费的VPN连接组。
enterprise_project_id
String
eip1
ResponseEip object
VPN网关使用的第一个EIP。在VPN网关的状态为ACTIVE时返回。
eip2
ResponseEip object
VPN网关使用的第二个EIP。在VPN网关的状态为ACTIVE时返回。
created_at
String
- 创建时间。在VPN网关的状态为ACTIVE时返回。
- UTC时间格式:yyyy-MM-ddTHH:mm:ssZ。
updated_at
String
- 最后一次更新时间。在VPN网关的状态为ACTIVE时返回。
- UTC时间格式:yyyy-MM-ddTHH:mm:ssZ。
access_vpc_id
String
- 功能说明:VPN网关使用的接入VPC ID。
- 格式:36位UUID。
access_subnet_id
String
- 功能说明:VPN网关使用的接入VPC中的子网ID。
- 格式:36位UUID。
access_private_ip_1
String
私网类型VPN网关的接入私网IP,VPN网关使用该私网IP与对端网关建连。双活网关表示使用的第一个私网地址,主备表示主私网地址。
示例:192.168.52.9。仅当network_type为private时返回。
access_private_ip_2
String
私网类型VPN网关的接入私网IP,VPN网关使用该私网IP与对端网关建连。双活网关表示使用的第二个私网地址,主备表示备私网地址。
示例:192.168.52.9。仅当network_type为private时返回。
ha_mode
String
- 功能说明:网关的HA模式,"active-active"表示双活,"active-standby"表示主备。
- 取值范围:active-active,active-standby。
- 默认值:active-active。
policy_template
PolicyTemplate object
非固定IP接入VPN网关的策略模板配置,只有在规格为非固定IP接入VPN网关时返回。
supported_flavors
Array of String
网关可升配到的目标规格。
tags
Array of VpnResourceTag objects
标签列表。
表5 ResponseEip 名称
类型
描述
id
String
- 功能说明:EIP的ID。
- 格式:36位UUID。当使用默认企业项目时返回"0"。
ip_version
Integer
- 功能说明:EIP版本。
- 取值范围:4。
ip_billing_info
String
- 功能说明:EIP的订单信息。包年/包月EIP才会返回订单信息,按需计费的EIP不返回。
- 格式:order_id:product_id:region_id:project_id,如:
CS 22********LIBIV:00301-******-0--0:br-iaas-odin1:0605768a************c006c7e484aa。
type
String
ip_address
String
- 功能说明:EIP的公网IPv4地址。
- 格式:ipv4类型地址。例如:88.***.***.11。
charge_mode
String
bandwidth_id
String
- 功能说明:EIP的带宽ID。
- 格式:36位UUID。
bandwidth_size
Integer
- 功能说明:EIP的带宽大小,单位:Mbit/s。每个region能够提供的EIP最大带宽不同,EIP的最大带宽受限于EIP服务,可以使用工单来提高帐户下的EIP的最大带宽。
- 取值范围:1-1000,具体取值请参考弹性公网服务创建EIP资料。
bandwidth_name
String
- 功能说明:EIP的带宽名称。
- 取值范围:1-64个字符,支持数字、英文字母、中文(\u4e00 - \u9fa5)、_(下划线)、-(中划线)、.(点)。
bandwidth_billing_info
String
表6 PolicyTemplate 名称
类型
描述
ike_policy
IkePolicy object
ike 策略对象。
ipsec_policy
IpsecPolicy object
ipsec 策略对象。
表7 IkePolicy 名称
类型
描述
encryption_algorithm
String
- 功能说明:加密算法。
- 取值范围:aes-256-gcm-16,aes-128-gcm-16,aes-256,aes-192,aes-128。
dh_group
String
- 功能说明:第一阶段密钥交换使用的DH组。
- 取值范围:group14,group15,group16,group19,group20,group21,disable。
authentication_algorithm
String
- 功能说明:认证算法。
- 取值范围:sha2-512,sha2-384,sha2-256。
lifetime_seconds
Integer
- 功能说明:表示SA的生存周期,当该生存周期超时后IKE SA将自动更新。
- 取值范围:60-604800,单位:秒。
表8 IpsecPolicy 名称
类型
描述
authentication_algorithm
String
- 功能说明:认证算法。
- 取值范围:sha2-512,sha2-384,sha2-256。
encryption_algorithm
String
- 功能说明:加密算法。
- 取值范围:aes-256-gcm-16,aes-128-gcm-16,aes-256,aes-192,aes-128。
pfs
String
- 功能说明:PFS使用的DH密钥组。
- 取值范围:group14,group15,group16,group19,group20,group21,disable。
lifetime_seconds
Integer
- 功能说明:表示配置IPSec连接建立的隧道以时间为基准的生存周期。
- 取值范围:30-604800,单位:秒。
- 响应样例
- 查询所有VPN网关的响应。
{ "vpn_gateways": [{ "id": "8e1d0686-demo-a8df-va86-91f32fa1dfc8", "name": "vpngw-1af3", "network_type": "public", "status": "ACTIVE", "attachment_type": "vpc", "vpc_id": "91a74241-demo-a8df-va86-9b5f98c66c8c", "local_subnets": ["192.168.15.0/24"], "connect_subnet": "f5741286-demo-a8df-va86-2c82bd9ee114", "bgp_asn": 64512, "flavor": "Professional1", "availability_zone_ids": ["cn-south-1f", "cn-south-1e"], "connection_number": 200, "used_connection_number": 0, "used_connection_group": 0, "enterprise_project_id": "0", "eip1": { "id": "8ff5d6b5-demo-a8df-va86-b9d598033153", "ip_version": 4, "type": "5_bgp", "ip_address": "88.***.***.111", "charge_mode": "bandwidth", "bandwidth_id": "aa62f8f2-demo-a8df-va86-b05b2b999715", "bandwidth_size": 300, "bandwidth_name": "vpngw-bandwidth-13a3" }, "eip2": { "id": "08e7e927-demo-a8df-va86-26a6394021eb", "ip_version": 4, "type": "5_bgp", "ip_address": "88.***.***.199", "charge_mode": "bandwidth", "bandwidth_id": "887d61f7-demo-a8df-va86-38ee8232e27c", "bandwidth_size": 300, "bandwidth_name": "vpngw-bandwidth-1afb" }, "created_at": "2022-11-28T02:36:16.834Z", "updated_at": "2022-11-28T02:36:16.834Z", "access_vpc_id": "91a74241-demo-a8df-va86-9b5f98c66c8c", "access_subnet_id": "f5741286-demo-a8df-va86-2c82bd9ee114", "ha_mode": "active-active" }, { "id": "66ddeacb-demo-a8df-va86-9a414b5bd7d5", "name": "vpngw-2be4", "network_type": "public", "status": "ACTIVE", "attachment_type": "er", "er_id": "c62fad0d-demo-a8df-va86-e06c4c351b9f", "bgp_asn": 64512, "flavor": "Professional1", "availability_zone_ids": ["cn-south-1f", "cn-south-1e"], "connection_number": 200, "used_connection_number": 0, "used_connection_group": 0, "enterprise_project_id": "0", "eip1": { "id": "0f6d1415-demo-a8df-va86-edb2ee97c9cc", "ip_version": 4, "type": "5_bgp", "ip_address": "88.***.***.251", "charge_mode": "bandwidth", "bandwidth_id": "e93767cc-demo-a8df-va86-bac2987f90a4", "bandwidth_size": 300, "bandwidth_name": "vpngw-bandwidth-10c3" }, "eip2": { "id": "7b46b62f-demo-a8df-va86-6b8e44312416", "ip_version": 4, "type": "5_bgp", "ip_address": "88.***.***.102", "charge_mode": "bandwidth", "bandwidth_id": "bde3557e-demo-a8df-va86-629a3754ae07", "bandwidth_size": 300, "bandwidth_name": "vpngw-bandwidth-18bd", }, "created_at": "2022-11-28T02:22:27.24Z", "updated_at": "2022-11-28T02:22:27.24Z", "access_vpc_id": "0cf79a3f-demo-a8df-va86-d7ace626b0fa", "access_subnet_id": "f5741286-demo-a8df-va86-2c82bd9ee114", "ha_mode": "active-active" },{ "id":"66ddeacb-demo-a8df-va86-9a414b5bd7d5", "name":"vpngw-5bd6", "network_type":"public", "status":"ACTIVE", "attachment_type":"vpc", "vpc_id":"c62fad0d-demo-a8df-va86-e06c4c351b9f", "local_subnets":[ "192.168.0.0/24" ], "connect_subnet":"fd75bf7b--demo-a8df-va86-db13f03e299a", "bgp_asn":64512, "flavor":"Professional1-NonFixedIP", "availability_zone_ids":[ "cn-north-7c" ], "connection_number":200, "used_connection_number":0, "used_connection_group":0, "enterprise_project_id":"0", "ha_mode":"active-standby", "eip1":{ "id":"0f6d1415-demo-a8df-va86-edb2ee97c9cc", "ip_version":4, "type":"5_bgp", "ip_address":"88.***.***.251", "charge_mode":"bandwidth", "bandwidth_id":"e93767cc-demo-a8df-va86-bac2987f90a4", "bandwidth_size":300, "bandwidth_name":"vpngw-bandwidth-10c3" }, "eip2":{ "id":"7b46b62f-demo-a8df-va86-6b8e44312416", "ip_version":4, "type":"5_bgp", "ip_address":"88.***.***.102", "charge_mode":"bandwidth", "bandwidth_id":"bde3557e-demo-a8df-va86-629a3754ae07", "bandwidth_size":300, "bandwidth_name":"vpngw-bandwidth-18bd" }, "policy_template":{ "ike_policy":{ "encryption_algorithm":"aes-128", "dh_group":"group20", "authentication_algorithm":"sha2-256", "lifetime_seconds":86400 }, "ipsec_policy":{ "authentication_algorithm":"sha2-256", "encryption_algorithm":"aes-128", "pfs":"group20", "lifetime_seconds":3600 } }, "created_at":"2022-11-28T02:22:27.24Z", "updated_at":"2022-11-28T02:22:27.24Z", "access_vpc_id":"4d03fe2d--demo-a8df-va86-6def96440f2b", "access_subnet_id":"fd75bf7b--demo-a8df-va86-e-db13f03e299a" }], "request_id": "de1b6caf-d024-4dac-850e-645af40c84f3" }
- 根据enterprise_project_id查询VPN网关的响应。
{ "vpn_gateways": [{ "id": "8e1d0686-demo-a8df-va86-91f32fa1dfc8", "name": "vpngw-1af3", "network_type": "public", "status": "ACTIVE", "attachment_type": "vpc", "vpc_id": "91a74241-demo-a8df-va86-9b5f98c66c8c", "local_subnets": ["192.168.15.0/24"], "connect_subnet": "f5741286-demo-a8df-va86-2c82bd9ee114", "bgp_asn": 64512, "flavor": "Professional1", "availability_zone_ids": ["cn-south-1f", "cn-south-1e"], "connection_number": 200, "used_connection_number": 0, "used_connection_group": 0, "enterprise_project_id": "7354dda9-demo-a8df-va86-a6b08fb92043", "eip1": { "id": "8ff5d6b5-demo-a8df-va86-b9d598033153", "ip_version": 4, "type": "5_bgp", "ip_address": "88.***.***.111", "charge_mode": "bandwidth", "bandwidth_id": "aa62f8f2-demo-a8df-va86-b05b2b999715", "bandwidth_size": 300, "bandwidth_name": "vpngw-bandwidth-13a3" }, "eip2": { "id": "08e7e927-demo-a8df-va86-26a6394021eb", "ip_version": 4, "type": "5_bgp", "ip_address": "88.***.***.199", "charge_mode": "bandwidth", "bandwidth_id": "887d61f7-demo-a8df-va86-38ee8232e27c", "bandwidth_size": 300, "bandwidth_name": "vpngw-bandwidth-1afb" }, "created_at": "2022-11-28T02:36:16.834Z", "updated_at": "2022-11-28T02:36:16.834Z", "access_vpc_id": "91a74241-demo-a8df-va86-9b5f98c66c8c", "access_subnet_id": "f5741286-demo-a8df-va86-2c82bd9ee114", "ha_mode": "active-active" }, { "id": "66ddeacb-demo-a8df-va86-9a414b5bd7d5", "name": "vpngw-2be4", "network_type": "private", "status": "ACTIVE", "attachment_type": "er", "er_id": "c62fad0d-demo-a8df-va86-e06c4c351b9f", "bgp_asn": 64512, "flavor": "Professional1", "availability_zone_ids": ["cn-south-1f", "cn-south-1e"], "connection_number": 200, "used_connection_number": 0, "used_connection_group": 0, "enterprise_project_id": "7354dda9-demo-a8df-va86-a6b08fb92043", "access_private_ip_1": "192.168.4.7", "access_private_ip_2": "192.168.4.99", "created_at": "2022-11-28T02:22:27.24Z", "updated_at": "2022-11-28T02:22:27.24Z", "access_vpc_id": "0cf79a3f-demo-a8df-va86-d7ace626b0fa", "access_subnet_id": "f5741286-demo-a8df-va86-2c82bd9ee114", "ha_mode": "active-active" },{ "id":"66ddeacb-demo-a8df-va86-9a414b5bd7d5", "name":"vpngw-5bd6", "network_type":"public", "status":"ACTIVE", "attachment_type":"vpc", "vpc_id":"c62fad0d-demo-a8df-va86-e06c4c351b9f", "local_subnets":[ "192.168.0.0/24" ], "connect_subnet":"fd75bf7b--demo-a8df-va86-db13f03e299a", "bgp_asn":64512, "flavor":"Professional1-NonFixedIP", "availability_zone_ids":[ "cn-north-7c" ], "connection_number":200, "used_connection_number":0, "used_connection_group":0, "enterprise_project_id":"0", "ha_mode":"active-standby", "eip1":{ "id":"0f6d1415-demo-a8df-va86-edb2ee97c9cc", "ip_version":4, "type":"5_bgp", "ip_address":"88.***.***.251", "charge_mode":"bandwidth", "bandwidth_id":"e93767cc-demo-a8df-va86-bac2987f90a4", "bandwidth_size":300, "bandwidth_name":"vpngw-bandwidth-10c3" }, "eip2":{ "id":"7b46b62f-demo-a8df-va86-6b8e44312416", "ip_version":4, "type":"5_bgp", "ip_address":"88.***.***.102", "charge_mode":"bandwidth", "bandwidth_id":"bde3557e-demo-a8df-va86-629a3754ae07", "bandwidth_size":300, "bandwidth_name":"vpngw-bandwidth-18bd" }, "policy_template":{ "ike_policy":{ "encryption_algorithm":"aes-128", "dh_group":"group20", "authentication_algorithm":"sha2-256", "lifetime_seconds":86400 }, "ipsec_policy":{ "authentication_algorithm":"sha2-256", "encryption_algorithm":"aes-128", "pfs":"group20", "lifetime_seconds":3600 } }, "created_at":"2022-11-28T02:22:27.24Z", "updated_at":"2022-11-28T02:22:27.24Z", "access_vpc_id":"4d03fe2d--demo-a8df-va86-6def96440f2b", "access_subnet_id":"fd75bf7b--demo-a8df-va86-e-db13f03e299a" }], "request_id": "bfa819a1-e824-4799-8e72-21a35dad97c9" }
- 查询所有VPN网关的响应。