SHOW NETWORK POLICIES¶

Lists all network policies defined in the system.

See also:

ALTER NETWORK POLICY , CREATE NETWORK POLICY , DESCRIBE NETWORK POLICY , DROP NETWORK POLICY

Syntax¶

SHOW NETWORK POLICIES
Copy

Usage notes¶

  • Only the network policy owner (that is, role with the OWNERSHIP privilege on the network policy) or higher can execute this command.

  • The command doesn’t require a running warehouse to execute.

  • The command only returns objects for which the current user’s current role has been granted at least one access privilege.

  • The MANAGE GRANTS access privilege implicitly allows its holder to see every object in the account. By default, only the account administrator (users with the ACCOUNTADMIN role) and security administrator (users with the SECURITYADMIN role) have the MANAGE GRANTS privilege.

  • To post-process the output of this command, you can use the RESULT_SCAN function, which treats the output as a table that can be queried.

  • The command returns a maximum of ten thousand records for the specified object type, as dictated by the access privileges for the role used to execute the command. Any records above the ten thousand records limit aren’t returned, even with a filter applied.

    To view results for which more than ten thousand records exist, query the corresponding view (if one exists) in the Snowflake Information Schema.

Examples¶

List all network policies:

SHOW NETWORK POLICIES;
Copy
+-------------------------------+----------+---------+----------------------------+----------------------------+---------------------------------------------------------------------+
| created_on                    | name     | comment | entries_in_allowed_ip_list | entries_in_blocked_ip_list | entries_in_allowed_network_rules | entries_in_blocked_network_rules |
|-------------------------------+----------+---------+----------------------------+----------------------------+----------------------------------+----------------------------------|
| 2016-04-29 13:22:34.034 -0700 | Policy1  |         |                          2 |                          1 |                                 0|                                0 |
| 2016-04-28 17:31:59.269 -0700 | Policy2  |         |                          1 |                          0 |                                 0|                                0 |
+-------------------------------+----------+---------+----------------------------+----------------------------+----------------------------------+----------------------------------+