NetworkRule

Snowflake Documentation

A Network Rule in Snowflake defines a set of network addresses, such as IP addresses or hostnames, that can be allowed or denied access to a Snowflake account. This helps in managing network traffic and securing access based on network policies.

Examples

Python

network_rule = NetworkRule(
    name="some_network_rule",
    type="IPV4",
    value_list=["192.168.1.1", "192.168.1.2"],
    mode="INGRESS",
    comment="Example network rule"
)

YAML

network_rules:
  - name: some_network_rule
    type: IPV4
    value_list: ["192.168.1.1", "192.168.1.2"]
    mode: INGRESS
    comment: "Example network rule"

Fields

  • name (string, required) - The name of the network rule.

  • type (string or NetworkIdentifierType, required) - The type of network identifier. Defaults to IPV4.

  • value_list (list) - A list of values associated with the network rule.

  • mode (string or NetworkRuleMode) - The mode of the network rule. Defaults to INGRESS.

  • comment (string) - A comment about the network rule.

  • owner (string or Role) - The owner role of the network rule. Defaults to "SYSADMIN".

Last updated