更新时间:2025-02-07 GMT+08:00
查询VPC列表
功能介绍
查询虚拟私有云列表。
URI
GET /v1/{project_id}/vpcs
样例:
GET https://{Endpoint}/v1/{project_id}/vpcs?limit=10&marker=13551d6b-755d-4757-b956-536f674975c0 参数说明请参见表1。
名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
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 |
|
响应示例
{
"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"
}
]
} 状态码
请参见状态码。
错误码
请参考错误码。
父主题:VPC

