本接口用于获取私有网络列表。
下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | ListVPCInstances | 接口名称。当前 API 的名称为 ListVPCInstances。 |
Version | String | 是 | 2021-04-30 | 接口版本。当前 API 的版本为 2021-04-30。 |
projects | String[] | 否 | default | 项目列表。项目之间用半角逗号(,)分隔。 |
limit | Integer | 否 | 10 | 分页查询时设置的每页行数。 默认值:1000。 |
order_by | Integer | 否 | 1 | 查询出来的私有网络的排列顺序,按照创建时间排序。取值范围:
|
page | Integer | 否 | 1 | 私有网络列表的页码。 默认值:1。 |
TagFilters.N.Key | String[] | 否 | env | 标签键。 |
TagFilters.N.Values.N | String[] | 否 | prod | 标签值列表。 |
cluster_names | String[] | 否 | ****-zzcu01 | 节点名称的列表。多个节点之间用半角逗号(,)分隔。 |
vpc_identity_list | String[] | 否 | vpc-sbjngs**** | 私有网络的 ID 的列表。多个私有网络之间用半角逗号(,)分隔。 |
is_vlan_vpc | Boolean | 否 | false | 是否是 VLAN 私有网络:
|
is_default_vpc | Boolean | 否 | false | 是否是默认私有网络:
|
is_custom_vpc | Boolean | 否 | true | 是否是自定义私有网络:
|
with_resource_statistic | Boolean | 否 | false | 是否返回私有网络下的资源的统计数据。取值范围:
|
with_tag_info | Boolean | 否 | false | 是否返回私有网络的标签信息。取值范围:
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结果。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
count | Integer | 1 | 私有网络的数量。 |
vpc_instances | Object[] | - | 私有网络的列表。 |
GET https://veenedge.volcengineapi.com/?Action=ListVPCInstances&Version=2021-04-30 &with_resource_statistic=true &<其他公共参数>
{ "ResponseMetadata": { "RequestId": "20240319200454BFD1FA5DC840BA24****", "Action": "ListVPCInstances", "Version": "2021-04-30", "Service": "veenedge", "Region": "cn-north-1" }, "Result": { "vpc_instances": [ { "account_identity": 210006****, "user_identity": 0, "vpc_identity": "vpc-fwgwcb****", "vpc_name": "自定义vpc0001", "vpc_ns": "ns-210006**", "cluster_vpc_id": 29**, "cluster": { "cluster_name": "**ct03", "country": "CN", "region": "NorthChina", "province": "TJ", "city": "120000", "isp": "CTCC", "level": "2", "alias": "**电信03" }, "status": "available", "is_default": false, "desc": "", "sub_nets": [ { "account_identity": 210006****, "user_identity": 0, "subnet_identity": "subnet-5vw6c67cwjj****", "cidr_ip": "172.16.0.0", "cidr_mask": 20, "name": "子网09", "desc": "", "status": "available", "create_time": 1692947336, "update_time": 1692947336 } ], "resource_statistic": { "veen_instance_count": 1, "veew_sg_instance_count": 1, "veew_lb_instance_count": 0, "veew_route_table_instance_count": 1, "veew_natgw_instance_count": 0 }, "local_account_vgw_num": 0, "cross_account_vgw_num": 0, "is_custom": true, "segment": "172.16.0.0/12", "create_time": 1692947336, "update_time": 1692947336 }, { "account_identity": 210006****, "user_identity": 0, "vpc_identity": "vpc-6b4hvr****", "vpc_name": "vpc-01", "vpc_ns": "ns-210006****", "cluster_vpc_id": 35**, "cluster": { "cluster_name": "**cm04", "country": "CN", "region": "Southwest", "province": "SC", "city": "510100", "isp": "CMCC", "level": "2", "alias": "**移动04" }, "status": "available", "is_default": false, "desc": "", "sub_nets": [ { "account_identity": 210006****, "user_identity": 0, "subnet_identity": "subnet-sl7jpnt69tr****", "cidr_ip": "172.16.1.0", "cidr_mask": 24, "name": "SubNet01", "desc": "", "status": "available", "create_time": 1710417509, "update_time": 1710417510 }, { "account_identity": 210006****, "user_identity": 0, "subnet_identity": "subnet-2hjczm2llvk****", "cidr_ip": "172.16.2.0", "cidr_mask": 24, "name": "SubNet02", "desc": "", "status": "available", "create_time": 1710417941, "update_time": 1710417941 } ], "resource_statistic": { "veen_instance_count": 3, "veew_sg_instance_count": 1, "veew_lb_instance_count": 0, "veew_route_table_instance_count": 1, "veew_natgw_instance_count": 0 }, "local_account_vgw_num": 0, "cross_account_vgw_num": 0, "is_custom": true, "segment": "172.16.0.0/12", "create_time": 1710417509, "update_time": 1710417941 }, { "account_identity": 210006****, "user_identity": 0, "vpc_identity": "vpc-6stb4j****", "vpc_name": "Net01", "vpc_ns": "ns-210006****", "cluster_vpc_id": 25**, "cluster": { "cluster_name": "**cm04", "country": "CN", "region": "Southwest", "province": "SC", "city": "510100", "isp": "CMCC", "level": "2", "alias": "**移动04" }, "status": "available", "is_default": false, "desc": "", "sub_nets": [ { "account_identity": 210006****, "user_identity": 0, "subnet_identity": "subnet-wmp96wx5sh6****", "cidr_ip": "172.16.1.0", "cidr_mask": 24, "name": "SubNet011", "desc": "", "status": "available", "create_time": 1710419433, "update_time": 1710419433 } ], "resource_statistic": { "veen_instance_count": 0, "veew_sg_instance_count": 1, "veew_lb_instance_count": 0, "veew_route_table_instance_count": 1, "veew_natgw_instance_count": 0 }, "local_account_vgw_num": 0, "cross_account_vgw_num": 0, "is_custom": true, "segment": "172.16.1.0/24", "create_time": 1710419433, "update_time": 1710419433 } ], "count": 3 } }
如果响应正文中包含 Error 字段,则表示 API 请求失败。关于错误码的更多信息,参见错误码。