A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/sql/create-network-policy below:

Website Navigation


CREATE NETWORK POLICY | Snowflake Documentation

CREATE NETWORK POLICY

Creates a network policy or replaces an existing network policy.

Note

Only security administrators (i.e. users with the SECURITYADMIN role) or higher or a role with the global CREATE NETWORK POLICY privilege can create network policies.

See also:

ALTER NETWORK POLICY , DROP NETWORK POLICY , SHOW NETWORK POLICIES , DESCRIBE NETWORK POLICY

ALTER ACCOUNT

Syntax
CREATE [ OR REPLACE ] NETWORK POLICY [ IF NOT EXISTS ] <name>
  [ ALLOWED_NETWORK_RULE_LIST = ( '<network_rule>' [ , '<network_rule>' , ... ] ) ]
  [ BLOCKED_NETWORK_RULE_LIST = ( '<network_rule>' [ , '<network_rule>' , ... ] ) ]
  [ ALLOWED_IP_LIST = ( [ '<ip_address>' ] [ , '<ip_address>' , ... ] ) ]
  [ BLOCKED_IP_LIST = ( [ '<ip_address>' ] [ , '<ip_address>' , ... ] ) ]
  [ COMMENT = '<string_literal>' ]

Copy

Required parameters
name

Identifier for the network policy; must be unique for your account.

The identifier value must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (for example, "My object"). Identifiers enclosed in double quotes are also case-sensitive.

For more details, see Identifier requirements.

Optional parameters
ALLOWED_NETWORK_RULE_LIST = ( 'network_rule' [ , 'network_rule' , ... ] )

Specifies a list of network rules that contain the network identifiers that are allowed access to Snowflake. There is no limit on the number of network rules in the list.

BLOCKED_NETWORK_RULE_LIST = ( 'network_rule' [ , 'network_rule' , ... ] )

Specifies a list of network rules that contain the network identifiers that are denied access to Snowflake. There is no limit on the number of network rules in the list.

ALLOWED_IP_LIST = ( [ ip_address ] [ , ip_address , ... ] )

Specifies a list of IPv4 addresses that are allowed access to your Snowflake account. This is referred to as the allowed list.

Snowflake recommends using network rules in conjunction with network policies rather than using this property. Use the ALLOWED_NETWORK_RULE_LIST property to specify network rules that contain IPv4 addresses.

If you are not yet using network rules, specify at least one IPv4 address or CIDR block range to allow access to your Snowflake account. Additionally, if you are not using network rules and this property is specified with an empty list, no IPv4 addresses are allowed to access your Snowflake account.

BLOCKED_IP_LIST = ( [ ip_address ] [ , ip_address , ... ] )

Specifies a list of IPv4 addresses that are denied access to your Snowflake account. This is referred to as the blocked list. To unset this parameter, specify a different CIDR block range, a series of IPv4 addresses, or a single IPv4 address.

Snowflake recommends using network rules in conjunction with network policies rather than using this parameter. Use the BLOCKED_NETWORK_RULE_LIST property to specify network rules that contain IPv4 addresses.

To block public access, use a network rule and add the network rule to the BLOCKED_NETWORK_RULE_LIST property. The result is that only IP addresses that use private connectivity, such as AWS PrivateLink, can access your Snowflake account.

Default: No value; no IP addresses in ALLOWED_IP_LIST property are blocked.

COMMENT = 'string_literal'

Specifies a comment for the network policy.

Default: No value

Access control requirements

A role used to execute this operation must have the following privileges at a minimum:

Privilege

Object

Notes

CREATE NETWORK POLICY

Account

Only the SECURITYADMIN role, or a higher role, has this privilege by default. The privilege can be granted to additional roles as needed.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes Example

Create a network policy named allow_vpceid_block_public_policy based on two network rules, one that allows a VPCE ID and one that blocks public network traffic, as described in Interaction between allowed lists and blocked lists.

CREATE NETWORK POLICY allow_vpceid_block_public_policy
  ALLOWED_NETWORK_RULE_LIST = ('allow_vpceid_access')
  BLOCKED_NETWORK_RULE_LIST = ('block_public_access');

DESC NETWORK POLICY rule_based_policy;

Copy

+---------------------------+---------------------+
| name                      | value               |
|---------------------------+---------------------|
| ALLOWED_NETWORK_RULE_LIST | ALLOW_VPCEID_ACCESS |
+---------------------------+---------------------+
| BLOCKED_NETWORK_RULE_LIST | BLOCK_PUBLIC_ACCESS |
+---------------------------+---------------------+

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4