Listing NSGs

List the network security groups (NSGs) in a virtual cloud network (VCN).

    1. Open the navigation menu, click Networking, and then click Virtual cloud networks.
    2. Click the VCN you're interested in.
    3. Under Resources, click Network Security Groups.
  • Use the network nsg list command and required parameters to list the NSGs in a VCN:

    oci network nsg list [ --compartment-id compartment-ocid | --vlan-id vlan-ocid ]  ... [OPTIONS]

    You must specify either a --vlan-id or a --compartment-id, but can't specify both. If you specify a --vlan-id, all other parameters are ignored.

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the ListNetworkSecurityGroups operation to list the NSGs in your compartment.