Query VPC intranet IP
Updated at:2025-10-16
Description
Retrieve information about the intranet IP of a VPC.
- Only used IP information can be queried. When querying unused IPs, this API will not report an error but will not include them in the results
- The maximum count of IPs per query is 100
- The privateIpAddresses and privateIpRange cannot be empty simultaneously
- When both privateIpAddresses and privateIpRange exist simultaneously, privateIpRange must take precedence
Request structure
Plain Text
1 GET /v{version}/vpc/{vpcId}/privateIpAddressInfo?privateIpAddresses=192.168.0.5&privateIpAddresses=192.168.0.6 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 |
| privateIpAddresses | List<String> | No | Query | List of IPs to be queried; it cannot be empty simultaneously with privateIpRange. When both exist simultaneously, privateIpRange must take precedence |
| privateIpRange | String | No | Query | Range of IPs to be queried, formatted as "192.168.0.1-192.168.0.5"; it cannot be empty simultaneously with privateIpAddresses. When both exist simultaneously, privateIpRange must take precedence |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| vpcPrivateIpAddresses | [List<VpcPrivateIpAddress>](VPC/API Reference/Appendix.md#VpcPrivateIpAddresses) | List of PrivateIpAddresses within the VPC |
Request example
Plain Text
1 GET /v1/vpc/vpc-IyWRtII7/privateIpAddressInfo?privateIpAddresses=10.4.2.2&privateIpAddresses=10.4.2.3 HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
Response example
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: cae72192-b5e6-4e3b-81fd-b91fab13d876
3 Date: Thu, 16 Mar 2017 06:29:48 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
6 {
7 "vpcPrivateIpAddresses":[
8 {
9 "privateIpAddress":"10.4.2.2",
10 "cidr":"10.4.2.0/24",
11 "privateIpAddressType":"BLB",
12 "createdTime":"2018-12-27T15:40:10Z"
13 }
14 ]
15 }
Request example
Plain Text
1 GET /v1/vpc/vpc-IyWRtII7/privateIpAddressInfo?privateIpRange=172.17.1.0-172.17.1.5 HTTP/1.1
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string
Response example
Plain Text
1 HTTP/1.1 200 OK
2 x-bce-request-id: cae72192-b5e6-4e3b-81fd-b91fab13d875
3 Date: Thu, 16 Mar 2017 06:29:48 GMT
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
6 {
7 "vpcPrivateIpAddresses": [
8 {
9 "cidr": "172.17.1.0/24",
10 "privateIpAddress": "172.17.1.1",
11 "privateIpAddressType": "sys_occupancy",
12 "createdTime": "2020-11-19T12:46:01Z"
13 },
14 {
15 "cidr": "172.17.1.0/24",
16 "privateIpAddress": "172.17.1.2",
17 "privateIpAddressType": "dhcp",
18 "createdTime": "2020-06-23T07:50:14Z"
19 },
20 {
21 "cidr": "172.17.1.0/24",
22 "privateIpAddress": "172.17.1.3",
23 "privateIpAddressType": "dhcp",
24 "createdTime": "2020-06-23T07:50:16Z"
25 }
26 ]
27 }
