查询端口
功能介绍
查询单个端口。
URI
GET /v1/{project_id}/ports/{port_id}
请求参数
无
请求示例
GET https://{Endpoint}/v1/{project_id}/ports/d00f9c13-412f-4855-8af3-de5d8c24cd60
响应参数
|
名称 |
参数类型 |
说明 |
|---|---|---|
|
id |
String |
端口唯一标识。 |
|
name |
String |
|
|
network_id |
String |
|
|
admin_state_up |
Boolean |
|
|
mac_address |
String |
|
|
fixed_ips |
Array of fixed_ip objects |
|
|
device_id |
String |
|
|
device_owner |
String |
|
|
tenant_id |
String |
项目ID。 |
|
status |
String |
|
|
security_groups |
Array of strings |
安全组的UUID(扩展属性)。 |
|
allowed_address_pairs |
Array of allowed_address_pairs objects |
|
|
extra_dhcp_opts |
Array of extra_dhcp_opt objects |
DHCP的扩展Option(扩展属性),请参见表6 extra_dhcp_opt对象。 |
|
binding:vif_details |
binding:vif_details object |
vif的详细信息,参见表7。 |
|
binding:profile |
Object |
扩展属性:提供用户设置自定义信息。 【使用说明】 |
|
binding:vnic_type |
String |
|
|
dns_assignment |
Array of dns_assignment objects |
|
|
dns_name |
String |
|
|
instance_id |
String |
|
|
instance_type |
String |
|
|
port_security_enabled |
Boolean |
|
|
ipv6_bandwidth_id |
String |
|
|
名称 |
参数类型 |
说明 |
|---|---|---|
|
ip_address |
String |
|
|
mac_address |
String |
MAC地址。默认使用本端口的MAC地址。 |
|
名称 |
参数类型 |
说明 |
|---|---|---|
|
opt_name |
String |
DHCP选项名称,目前仅支持填写“51”,表示DHCP租约时间。 |
|
opt_value |
String |
|
响应示例
{
"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"
}
],
"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"
}
}
状态码
请参见状态码。
错误码
请参考错误码。