查询vpc列表-九游平台
功能介绍
查询虚拟私有云列表。
调试
您可以在中调试该接口。
uri
get /v1/{project_id}/vpcs
get https://{endpoint}/v1/{project_id}/vpcs?limit=10&marker=13551d6b-755d-4757-b956-536f674975c0
名称 |
是否必选 |
参数类型 |
说明 |
---|---|---|---|
project_id |
是 |
string |
项目id,获取项目id请参见获取项目id。 |
id |
否 |
string |
按照vpc id过滤查询。 |
marker |
否 |
string |
分页查询的起始资源id,表示从指定资源的下一条记录开始查询。 marker需要和limit配合使用:
|
limit |
否 |
integer |
分页查询每页返回的记录个数,取值范围为0~intmax(2^31-1),默认值2000。 limit需要和marker配合使用,详细规则请见marker的参数说明。 |
enterprise_project_id |
否 |
string |
|
请求参数
无
请求示例
get https://{endpoint}/v1/{project_id}/vpcs
响应参数
名称 |
参数类型 |
说明 |
---|---|---|
id |
string |
uuid形式的一个资源标识。 |
name |
string |
|
description |
string |
|
cidr |
string |
|
status |
string |
|
enterprise_project_id |
string |
|
routes |
array of route objects |
|
tenant_id |
string |
|
created_at |
string |
|
updated_at |
string |
|
名称 |
参数类型 |
说明 |
---|---|---|
destination |
string |
|
nexthop |
string |
|
响应示例
{ "vpcs": [ { "id": "13551d6b-755d-4757-b956-536f674975c0", "name": "default", "description": "test", "cidr": "172.16.0.0/16", "status": "ok", "enterprise_project_id": "0", "routes": [], "tenant_id": "087679f0aa80d32a2f4ec0172f5e902b", "created_at": "2022-12-15t02:11:13", "updated_at": "2022-12-15t02:11:13" }, { "id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", "name": "222", "description": "test", "cidr": "192.168.0.0/16", "status": "ok", "enterprise_project_id": "0635d733-c12d-4308-ba5a-4dc27ec21038", "routes": [], "tenant_id": "087679f0aa80d32a2f4ec0172f5e902b", "created_at": "2022-12-15t04:01:21", "updated_at": "2022-12-15t04:01:21" }, { "id": "99d9d709-8478-4b46-9f3f-2206b1023fd3", "name": "vpc", "description": "test", "cidr": "192.168.0.0/16", "status": "ok", "enterprise_project_id": "0", "routes": [], "tenant_id": "087679f0aa80d32a2f4ec0172f5e902b", "created_at": "2022-12-15t05:36:29", "updated_at": "2022-12-15t05:36:29" } ] }
状态码
请参见状态码。
错误码
请参考错误码。
相关文档
意见反馈
文档内容是否对您有帮助?
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨