Query specified VPC
Updated at:2025-10-16
Description
Retrieve details for the specified VPC.
Request structure
Plain Text
1 GET /v{version}/vpc/{vpcId} HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | For API version No., the current value is 1 |
| vpcId | String | Yes | URL parameter | VPC ID |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| vpc | [ShowVpcModel](VPC/API Reference/Appendix.md#ShowVpcModel) | VPC entity |
Request example
Plain Text
1 GET /v1/vpc/vpc-IyrqYIQ7 HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Response example
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3 Date: Thu, 16 Mar 2017 06:29:48 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
6 {
7 "vpc": {
8 "vpcId": "vpc-IyrqYIQ7",
9 "name": "default",
10 "isDefault": true,
11 "relay": false,
12 "cidr": "192.168.0.0/20",
13 "ipv6Cidr": "2400:da00:e003:4c11::/64",
14 "description": "default",
15 "createdTime": "2017-09-20T03:11:10Z"
16 "subnets": [
17 {
18 "name": "System predefined subnet",
19 "subnetId": "sbn-IyWRnII7",
20 "zoneName": "cn-bj-a",
21 "cidr": "192.168.0.0/20",
22 "ipv6Cidr": "2400:da00:e003:4c11::/64",
23 "vpcId": "vpc-IyrqYIQ7",
24 "subnetType": "BCC",
25 "description": "this is a subnet",
26 "createdTime": "2018-03-14T14:45:02Z"
27 }
28 ],
29 "secondaryCidr": [
30 "10.0.1.0/24"
31 ],
32 "tags":[
33 {
34 "tagKey": "tagKey",
35 "tagValue": "tagValue"
36 }
37 ]
38 }
39 }
