功能介紹
查詢指定子網(wǎng)下的私有IP列表。
調(diào)試
您可以在API Explorer中調(diào)試該接口。
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
|
名稱 |
是否必選 |
參數(shù)類型 |
說明 |
|---|---|---|---|
|
project_id |
是 |
String |
項目ID,獲取項目ID請參見獲取項目ID。 |
|
subnet_id |
是 |
String |
私有IP所在子網(wǎng)的唯一標(biāo)識 如果您使用管理控制臺,此值即為子網(wǎng)詳情中的“網(wǎng)絡(luò)ID”參數(shù)值。 |
|
marker |
否 |
String |
分頁查詢的起始資源ID,表示從指定資源的下一條記錄開始查詢。 marker需要和limit配合使用:
|
|
limit |
否 |
Integer |
分頁查詢每頁返回的記錄個數(shù),取值范圍為0~intmax(2^31-1),默認(rèn)值2000。 limit需要和marker配合使用,詳細(xì)規(guī)則請見marker的參數(shù)說明。 |
請求參數(shù)
無
請求示例
GET https://{Endpoint}/v1/{project_id}/subnets/{subnet_id}/privateips
響應(yīng)參數(shù)
|
名稱 |
參數(shù)類型 |
說明 |
|---|---|---|
|
status |
String |
|
|
id |
String |
私有IP標(biāo)識 |
|
subnet_id |
String |
分配IP的子網(wǎng)標(biāo)識 如果您使用管理控制臺,此值即為子網(wǎng)詳情中的“網(wǎng)絡(luò)ID”參數(shù)值。 |
|
tenant_id |
String |
項目ID |
|
device_owner |
String |
|
|
ip_address |
String |
申請到的私有IP |
響應(yīng)示例
{
"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"
}
]
}
狀態(tài)碼
請參見狀態(tài)碼。
錯誤碼
請參考錯誤碼。
