获取 VPC 网络
基本信息
Action
DescribeRouters
Path
/iaas
Method
GET
请求参数
此接口除公共参数外,还包含以下参数。关于公共参数的更多信息,请参见前文内容。
| 参数 | 参数类型 | 描述 | 是否必选 |
|---|---|---|---|
routers.n |
String |
VPC 网络 ID |
否 |
vxnet |
String |
私用网络 ID |
否 |
status.n |
String |
VPC 网络状态: pending, active, poweroffed, suspended, deleted, ceased |
否 |
search_word |
String |
搜索关键词,支持 VPC 网络 ID, VPC 网络名称 |
否 |
tags.n |
String |
按照标签 ID 过滤, 只返回已绑定某标签的资源 |
否 |
verbose |
Integer |
是否返回冗长的信息,若为 1,则返回 VPC 网络相关其他资源的详细数据 |
否 |
返回数据
此接口除了返回公共响应参数外,还返回以下参数。关于公共响应参数的更多信息,请参见前文内容。
| 参数 | 参数类型 | 描述 |
|---|---|---|
router_set |
Array |
JSON 格式的 VPC 网络数据列表。 |
total_count |
Integer |
根据过滤条件得到的 VPC 网络总数 |
router_set 参数说明如下。
| 参数 | 参数类型 | 描述 |
|---|---|---|
router_id |
String |
VPC 网络 ID |
router_name |
String |
VPC 网络名称 |
description |
String |
VPC 网络描述 |
router_type |
Integer |
VPC 网络类型,目前有效值为 1. |
private_ip |
String |
VPC 网络内网 IP |
is_applied |
Integer |
VPC 网络规则是否已更新,1 为已更新,0 为还未更新。 |
status |
String |
VPC 网络状态,有效值为pending, active, poweroffed, suspended, deleted, ceased
|
transition_status |
String |
VPC 网络过渡状态,有效值为creating, updating, suspending, resuming,poweroffing,poweroning,deleting
|
create_time |
TimeStamp |
VPC 网络创建时间,为UTC时间,格式可参见 ISO8601 |
status_time |
TimeStamp |
VPC 网络最近一次状态变更时间,为UTC时间,格式可参见 ISO8601 |
security_group_id |
String |
VPC 网络的防火墙ID |
eip |
Dict |
VPC 网络的公网 IP 信息
|
vxnets |
Array |
VPC 网络连接的私有网络信息:
只有在请求参数 verbose=1 时才会返回此信息。 |
请求示例
https://api.<your_domain>/iaas/?action=DescribeRouters
&routers.1=rtr-b0u6sdj6
&verbose=1
&COMMON_PARAMS
返回示例
{
"action": "DescribeRoutersResponse",
"router_set": [
{
"status": "active",
"base_vxnet": "vxnet-ijduoo5",
"is_applied": 1,
"features": 3,
"vpc_network": "192.168.0.0/16",
"console_id": "qingcloud",
"create_time": "2019-12-11T01:16:41Z",
"alarm_status": "",
"private_ip": "10.120.67.38",
"resource_project_info": [ ],
"owner": "usr-CT3owI01",
"place_group_id": "plg-00000nfv",
"security_groups": [
{
"group_id": "sg-xmldyszl",
"group_name": "default security group"
}
],
"l3vni": 10811790,
"sub_code": 1,
"security_group_id": "sg-xmldyszl",
"source": "self",
"memory": 512,
"status_time": "2021-11-21T08:09:02Z",
"router_id": "rtr-8vwgl9kv",
"description": null,
"tags": [ ],
"transition_status": "",
"is_default": 0,
"controller": "self",
"vpc_id": "vpc-r7fzo0w1",
"vpc_ipv6_network": "",
"eip": {
"eip_name": "",
"eip_addr": "139.198.181.12",
"eip_id": "eip-ndy2crzh"
},
"hypervisor": "lxc",
"instance_id": "i-xilwvpi5",
"root_user_id": "usr-CT3owI01",
"dns_aliases": [ ],
"mode": 0,
"router_type": 1,
"router_name": "测试",
"cpu": 1
}
],
"has_share": 否,
"total_count": 1,
"ret_code": 0
}