Querying a Port
Function
This API is used to query details about a specified port.
Request Parameters
None
Example Request
GET https://{Endpoint}/v2.0/ports/791870bd-36a7-4d9b-b015-a78e9b06af08
Response Parameters
Parameter |
Type |
Description |
---|---|---|
port |
port object |
Specifies the port object list. For details, see Table 3. |
Attribute |
Type |
Description |
---|---|---|
id |
String |
|
name |
String |
Specifies the port name. |
network_id |
String |
Specifies the ID of the network that the port belongs to. |
admin_state_up |
Boolean |
|
mac_address |
String |
|
fixed_ips |
Array of fixed_ip objects |
|
device_id |
String |
|
device_owner |
String |
|
tenant_id |
String |
Specifies the project ID. |
status |
String |
|
security_groups |
Array of strings |
|
allowed_address_pairs |
Array of allowed_address_pairs objects |
|
extra_dhcp_opts |
Array of extra_dhcp_opt objects |
Specifies the extended DHCP option. This is an extended attribute. For details, see Table 6. |
binding:vif_details |
binding:vif_details object |
For details, see Table 8. |
binding:profile |
binding:profile object |
|
binding:vnic_type |
String |
|
port_security_enabled |
Boolean |
Specifies whether the security option is enabled for the port. true indicates that security groups can be added and DHCP anti-spoofing is enabled. false indicates that security groups and DHCP anti-spoofing are not applied. |
dns_assignment |
Array of dns_assignment objects |
|
dns_name |
String |
|
project_id |
String |
Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
created_at |
String |
|
updated_at |
String |
|
Attribute |
Type |
Description |
---|---|---|
subnet_id |
String |
|
ip_address |
String |
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
ip_address |
Yes |
String |
|
mac_address |
No |
String |
Specifies the MAC address. By default, the MAC address of the local port is used. |
Attribute |
Type |
Description |
---|---|---|
opt_name |
String |
Specifies the option name. |
opt_value |
String |
Specifies the option value. |
Parameter |
Type |
Description |
---|---|---|
hostname |
String |
Specifies the host name of the port. |
ip_address |
String |
Specifies the port IP address. |
fqdn |
String |
Specifies the private network fully qualified domain name (FQDN) of the port. |
Parameter |
Type |
Description |
---|---|---|
primary_interface |
Boolean |
If the value is true, this is the primary NIC. |
port_filter |
Boolean |
Specifies the port used for filtering in security groups to protect against MAC or IP spoofing. |
ovs_hybrid_plug |
Boolean |
Specifies that OVS hybrid plug should be used by Nova APIs. |
Example Response
{ "port": { "id": "791870bd-36a7-4d9b-b015-a78e9b06af08", "name": "port-test", "status": "DOWN", "admin_state_up": true, "fixed_ips": [], "mac_address": "fa:16:3e:01:e0:b2", "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171", "tenant_id": "db82c9e1415a464ea68048baa8acc6b8", "project_id": "db82c9e1415a464ea68048baa8acc6b8", "device_id": "", "device_owner": "", "security_groups": [ "d0d58aa9-cda9-414c-9c52-6c3daf8534e6" ], "extra_dhcp_opts": [], "allowed_address_pairs": [], "binding:vnic_type": "normal", "binding:vif_details": {}, "binding:profile": {}, "port_security_enabled": true, "created_at": "2018-09-13T01:43:41", "updated_at": "2018-09-13T01:43:41" } }
Status Code
See Status Codes.
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot