IBM Cloud Docs
Viewing details of a virtual network interface

Viewing details of a virtual network interface

With virtual network interfaces, where you view resources is different. In older network interfaces, you can view the details of the resources by going to the resource directly. In a virtual network interface, you can view the resource's details from within the virtual network interface.

You can view the details of a VNI with the console, CLI, API, or Terraform.

Viewing details of a virtual network interface from the UI

To view details of a virtual network interface from the UI, take the following steps:

  1. From your browser, open the IBM Cloud console and log in to your account.

  2. Select the Navigation menu Navigation menu icon, then click Infrastructure VPC icon > Network > Virtual network interfaces.

  3. Click the name of the virtual network interface that you want to view in the Virtual network interfaces for VPC table.

  4. In the Overview tab, you can view the following items:

    • The details of your virtual network interface
    • The resources that are attached to the virtual network interface
    • The target resource details, and where to add target resources if none are present
    • Any floating IPs that are attached
  5. In the Attached resources tab, you can view the secondary IP addresses and security groups that are attached.

Viewing details of a virtual network interface with the CLI

Before you begin, set up your CLI environment.

To view details of a virtual network interface from the CLI, enter the following command:

ibmcloud is virtual-network-interface VIRTUAL_NETWORK_INTERFACE [--output JSON] [-q, --quiet]

Where:

VIRTUAL_NETWORK_INTERFACE
ID or name of the virtual network interface.
--output
Specify output format, only JSON is supported. One of: JSON.
-q, --quiet
Suppress verbose output.

Command examples

  • ibmcloud is virtual-network-interface r006-81222eee-b3e0-4dc3-b429-aee9e5c0abf2
  • ibmcloud is virtual-network-interface new-share-vni

Viewing details of a virtual network interface with API

To view the details of a virtual network interface with the API, run the following command:

curl -X GET \
"$vpc_api_endpoint/v1/virtual_network_interfaces/$network_interface_id?version=$version&generation=2" \
-H "Authorization: Bearer $iam_token"

Viewing details of a virtual network interface with Terraform

The following example shows how to view the details of a virtual network interface by using Terraform:

data "ibm_is_virtual_network_interface" "example"
{
  virtual_network_interface = ibm_is_virtual_network_interface.my_vni.id
}