功能介紹
查詢單個(gè)端口
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
GET /v1/{project_id}/ports/{port_id}
|
名稱 |
是否必選 |
說明 |
|---|---|---|
|
project_id |
是 |
項(xiàng)目ID,請(qǐng)參見獲取項(xiàng)目ID。 |
|
port_id |
是 |
端口唯一標(biāo)識(shí) |
請(qǐng)求參數(shù)
無
請(qǐng)求示例
GET https://{Endpoint}/v1/{project_id}/ports/d00f9c13-412f-4855-8af3-de5d8c24cd60
響應(yīng)參數(shù)
|
名稱 |
參數(shù)類型 |
說明 |
|---|---|---|
|
id |
String |
端口唯一標(biāo)識(shí) |
|
name |
String |
|
|
network_id |
String |
說明:
網(wǎng)絡(luò)ID的獲取方式:
|
|
admin_state_up |
Boolean |
|
|
mac_address |
String |
|
|
fixed_ips |
||
|
device_id |
String |
|
|
device_owner |
String |
|
|
tenant_id |
String |
項(xiàng)目ID。 |
|
status |
String |
如果allowed_address_pairs回顯值為 云服務(wù)器 網(wǎng)卡IP地址,表示虛擬IP的端口處于綁定狀態(tài)。 |
|
security_groups |
Array of strings |
安全組的UUID(擴(kuò)展屬性) |
|
allowed_address_pairs |
||
|
extra_dhcp_opts |
DHCP的擴(kuò)展Option(擴(kuò)展屬性),請(qǐng)參見表6 extra_dhcp_opt對(duì)象 |
|
|
binding:vif_details |
||
|
binding:profile |
Object |
|
|
binding:vnic_type |
String |
|
|
dns_assignment |
|
|
|
dns_name |
String |
|
|
instance_id |
String |
|
|
instance_type |
String |
|
|
port_security_enabled |
Boolean |
|
|
zone_id |
String |
端口所屬的可用分區(qū) |
|
enable_efi |
Boolean |
|
|
名稱 |
參數(shù)類型 |
說明 |
|---|---|---|
|
subnet_id |
String |
功能說明:所屬子網(wǎng)ID 如果您使用管理控制臺(tái),此值即為子網(wǎng)詳情中的“IPv4子網(wǎng)ID”或“IPv6子網(wǎng)ID”參數(shù)值。 約束:不支持更新 |
|
ip_address |
String |
端口IP地址 |
|
名稱 |
參數(shù)類型 |
說明 |
|---|---|---|
|
ip_address |
String |
|
|
mac_address |
String |
MAC地址 |
|
名稱 |
參數(shù)類型 |
說明 |
|---|---|---|
|
opt_name |
String |
DHCP選項(xiàng)名稱,目前僅支持填寫“51”,表示DHCP租約時(shí)間。 |
|
opt_value |
String |
DHCP選項(xiàng)的值。 當(dāng)“opt_name”為“51”時(shí),參數(shù)格式為“Xh”,表示DHCP租約時(shí)間為X小時(shí)。 “X”的取值范圍為1~30000或“-1”,“-1”表示DHCP租約時(shí)間無限長。 |
響應(yīng)示例
{
"port": {
"id": "d00f9c13-412f-4855-8af3-de5d8c24cd60",
"name": "test",
"status": "DOWN",
"admin_state_up": "true",
"fixed_ips": [
{
"subnet_id": "70f2e74b-e660-410a-b754-0ca46744348a",
"ip_address": "10.128.1.10"
}
],
"dns_name": "",
"mac_address": "fa:16:3e:d7:f2:6c",
"network_id": "5b808927-13c9-4e60-a4f4-ed6ffe225167",
"tenant_id": "43f2d1cca56a40729dcb17212482f34d",
"device_id": "",
"device_owner": "",
"security_groups": [
"02b4e8ee-74fa-4a31-802e-5490df11245e"
],
"extra_dhcp_opts": [],
"allowed_address_pairs": [],
"binding:vnic_type": "normal",
"instance_type": "RDS",
"instance_id": "03a4e9ee-64eb-4a31-802e-5490df22146c",
"enable_efi": false
}
}
狀態(tài)碼
請(qǐng)參見狀態(tài)碼。
錯(cuò)誤碼
請(qǐng)參考錯(cuò)誤碼。
