Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com> Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
18 KiB
Querying Private IP Addresses
Function
This API is used to query private IP addresses using search criteria and to display the private IP addresses in a list.
URI
GET /v1/{project_id}/subnets/{subnet_id}/privateips
GET https://{Endpoint}/v1/{project_id}/subnets/{subnet_id}/privateips?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
subnet_id |
Yes |
String |
Specifies the unique ID of the subnet to which the private IP address belongs. If you use the management console, the value of this parameter is the Network ID value. |
marker |
No |
String |
Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. This parameter can work together with the parameter limit.
|
limit |
No |
Integer |
Specifies the number of records that will be returned on each page. The value is from 0 to intmax (2^31-1). The default value is 2000. limit can be used together with marker. For details, see the parameter description of marker. |
Request Parameters
None
Example Request
GET https://{Endpoint}/v1/{project_id}/subnets/{subnet_id}/privateips
Response Parameters
Parameter |
Type |
Description |
|---|---|---|
privateips |
Array of privateip objects |
Specifies the private IP address objects. For details, see Table 3. |
Example Response
{
"privateips": [
{
"status": "DOWN",
"id": "d600542a-b231-45ed-af05-e9930cb14f78",
"subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd",
"tenant_id": "8b7e35ad379141fc9df3e178bd64f55c",
"device_owner": "",
"ip_address": "192.168.1.11"
},
{
"status": "DOWN",
"id": "d600542a-b231-45ed-af05-e9930cb14f79",
"subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd",
"tenant_id": "8b7e35ad379141fc9df3e178bd64f55c",
"device_owner": "",
"ip_address": "192.168.1.12"
}
]
}
Status Code
See Status Codes.
Error Code
See Error Codes.