You need to enable JavaScript to run this app.
导航
获取私有网络列表
最近更新时间:2024.07.18 11:03:31首次发布时间:2022.02.25 18:58:31

本接口用于获取私有网络列表。

请求说明

  • 请求方式:GET
  • 请求地址:https://veenedge.volcengineapi.com/?Action=ListVPCInstances&Version=2021-04-30

请求参数

下表列出了接口特定的请求参数以及公共请求参数 Action 和 Version。 其他公共参数,请参见公共参数

Query

参数类型是否必选示例值描述
ActionStringListVPCInstances接口名称。当前 API 的名称为 ListVPCInstances
VersionString2021-04-30接口版本。当前 API 的版本为 2021-04-30
cluster_names[]String****-zzcu01节点名称的列表。多个节点之间用半角逗号(,)分隔。
vpc_identity_list[]Stringvpc-sbjngs****私有网络的 ID 的列表。多个私有网络之间用半角逗号(,)分隔。
fuzzy_vpc_id_or_nameStringvpc私有网络的 ID 或者名称。支持模糊查询。

is_vlan_vpc

Boolean

false

是否是 VLAN 私有网络:

  • true:VLAN 私有网络。
  • false:非 VLAN 私有网络。

is_default_vpc

Boolean

false

是否是默认私有网络:

  • true:默认私有网络。
  • false:该参数值无效。指定该参数值的效果等同于未指定is_default_vpc的值。

is_custom_vpc

Boolean

true

是否是自定义私有网络:

  • true:自定义私有网络。
  • false:非自定义私有网络。
fuzzy_segmentString172.1.0私有网络的网段。支持模糊查询。

with_resource_statistic

Boolean

false

是否返回私有网络下的资源的统计数据。取值范围:

  • true:返回资源的统计数据。
  • false(默认值):不返回资源的统计数据。

page

Integer

1

私有网络列表的页码。
如果 page 和 limit 参数都不指定,将返回全量数据;如果仅指定 limit,不指定 page ,将返回第 1 页数据;如果仅指定 page,不指定 limit,将返回全量数据;如果 page 和 limit 都指定,将返回符合条件的数据。

limit

Integer

10

分页查询时设置的每页行数。
如果 page 和 limit 参数都不指定,将返回全量数据;如果仅指定 limit,不指定 page ,将返回第 1 页数据;如果仅指定 page,不指定 limit,将返回全量数据;如果 page 和 limit 都指定,将返回符合条件的数据。

order_by

Integer

1

查询出来的私有网络的排列顺序,按照创建时间排序。取值范围:

  • 1(默认值):按照降序排列。
  • 2:按照升序排列。

返回参数

参数类型示例值描述
vpc_instances[]VpcInstances请参见返回示例私有网络的列表。
countLong1私有网络的数量。

VpcInstances

参数类型示例值描述
vpc_identityStringvpc-sbjngs****私有网络的 ID。
vpc_nameString**联通01-默认VPC私有网络的名称。
clusterCluster见下文说明私有网络所属的节点。

status

String

available

私有网络的状态:

  • available:可用。
  • modifying:变更中。

is_default

Boolean

true

是否是默认私有网络:

  • true:默认私有网络。
  • false:非默认私有网络。
descString**联通01-默认VPC私有网络的描述。

is_vlan

Boolean

true

是否是 VLAN 私有网络:

  • true:VLAN 私有网络。
  • false:非 VLAN 私有网络。
sub_nets[]SubNets见下文说明子网列表。
resource_statisticResourceStatistic见下文说明资源统计列表。
create_timeLong1632808736私有网络的创建时间。
update_timeLong1635757441私有网络的更新时间。
local_account_vgw_numLong1本账号边缘云网关的数量。
cross_account_vgw_numLong1跨账号边缘云网关的数量。

is_custom

Boolean

true

是否是自定义私有网络:

  • true:自定义私有网络。
  • false:非自定义私有网络。
segmentString172.16.0.0/12私有网络的网段。

Cluster

参数类型示例值描述
cluster_nameString****-zzcu01节点的名称。
countryStringCN节点所在国家。
regionStringCentralChina节点所在的区域。
provinceStringHA节点所在的省份。
cityString410100节点所在的城市。
ispStringCUCC运营商。

level

String

2

节点的计费类别:

  • 1:北上广
  • 2:地区中心
  • 3:一般城市
aliasString**联通01节点的中文名称。

SubNets

参数类型示例值描述
subnet_identityStringsubnet-t4qzc7f75gr****子网的 ID。
cidr_ipString172.**.**.128IP 地址。
cidr_maskInteger26前缀长度。
create_timeLong1634108663子网的创建时间。
update_timeLong1634108663子网的更新时间。
nameStringsubnet-dev01子网的名称。
descStringsubnet-dev01子网的描述。

status

String

available

子网的状态:

  • available:可用。
  • modifying:变更中。
  • deleting:删除中。

ResourceStatistic

参数类型示例值描述
veen_instance_countLong1边缘实例的数量。
veew_sg_instance_countLong1外网防火墙的数量。
veew_lb_instance_countLong1负载均衡实例的数量。
veew_route_table_instance_countLong1路由表的数量。
veew_natgw_instance_countLong1NAT 网关的数量。

请求示例

GET https://veenedge.volcengineapi.com/?Action=ListVPCInstances&Version=2021-04-30
&fuzzy_segment=172.16
&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 请求失败。关于错误码的更多信息,参见错误码