Listing NSGs
List the network security groups (NSGs) in a Virtual Cloud Network (VCN).
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.