Listing VCNs

List the VCNs available in a given compartment.

    1. Open the navigation menu, click Networking, and then click Virtual cloud networks.
    2. Under List Scope, select a compartment that you have permission to work in.The page updates to display only the resources in that compartment. If you're not sure which compartment to use, contact an administrator. For more information, see Access Control.
      Note

      To create any new resource the service limit for that resource must not already have been reached. Once the service limit for a resource type has been reached, you can either remove unused resources of that type or request a service limit increase.
    The console displays a list of VCNs in that compartment. The table is empty if there are no VCNs in that compartment.
  • Use the network vcn list command and required parameters to list the VCNs in a compartment:

    oci network vcn list --compartment-id compartment_id [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ListVcns operation to list the VCNs in the currently selected compartment.