查询端口-九游平台
功能介绍
查询单个端口。
调试
您可以在中调试该接口。
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 |
说明:
网络id的获取方式:
|
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 |
如果allowed_address_pairs回显值为云服务器网卡ip地址,表示虚拟ip的端口处于绑定状态。 |
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 |
|
zone_id |
string |
端口所属的可用分区。 |
enable_efi |
boolean |
|
ipv6_bandwidth_id |
string |
|
名称 |
参数类型 |
说明 |
---|---|---|
subnet_id |
string |
|
ip_address |
string |
端口ip地址。 |
名称 |
参数类型 |
说明 |
---|---|---|
ip_address |
string |
|
mac_address |
string |
mac地址。默认使用本端口的mac地址。 |
名称 |
参数类型 |
说明 |
---|---|---|
opt_name |
string |
dhcp选项名称,目前仅支持填写“51”,表示dhcp租约时间。 |
opt_value |
string |
|
名称 |
参数类型 |
说明 |
---|---|---|
primary_interface |
boolean |
取值为true,表示是虚拟机的主网卡。 |
port_filter |
boolean |
表示该网络服务提供端口过滤特性,如安全组和反mac/ip欺骗。 |
ovs_hybrid_plug |
boolean |
用于通知像nova这样的api消费者,应该使用ovs的混合插入策略。 |
名称 |
参数类型 |
说明 |
---|---|---|
hostname |
string |
端口hostname。 |
ip_address |
string |
端口ip地址。 |
fqdn |
string |
端口内网fqdn。 |
响应示例
{ "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 } }
状态码
请参见状态码。
错误码
请参考错误码。
相关文档
意见反馈
文档内容是否对您有帮助?
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨