Titan Core
  • Overview
  • Getting Started
  • Working With Resources
  • Blueprint
  • GitHub Action
  • Resources
    • APIAuthenticationSecurityIntegration
    • APIIntegration
    • AccountParameter
    • AggregationPolicy
    • Alert
    • AuthenticationPolicy
    • AzureStorageIntegration
    • ComputePool
    • Database
    • DatabaseRole
    • DynamicTable
    • EmailNotificationIntegration
    • EventTable
    • ExternalAccessIntegration
    • ExternalStage
    • FailoverGroup
    • FutureGrant
    • GCSStorageIntegration
    • GenericSecret
    • GlueCatalogIntegration
    • Grant
    • GrantOnAll
    • HybridTable
    • ImageRepository
    • InternalStage
    • JSONFileFormat
    • JavascriptUDF
    • MaterializedView
    • NetworkPolicy
    • NetworkRule
    • OAuthSecret
    • ObjectStoreCatalogIntegration
    • PackagesPolicy
    • ParquetFileFormat
    • PasswordPolicy
    • PasswordSecret
    • Pipe
    • PythonStoredProcedure
    • PythonUDF
    • ReplicationGroup
    • ResourceMonitor
    • Role
    • RoleGrant
    • S3StorageIntegration
    • Schema
    • Sequence
    • Service
    • SessionPolicy
    • Share
    • SnowflakePartnerOAuthSecurityIntegration
    • SnowservicesOAuthSecurityIntegration
    • StageStream
    • Table
    • TableStream
    • Tag
    • Task
    • User
    • View
    • ViewStream
    • Warehouse
Powered by GitBook
On this page
  • Examples
  • Python
  • YAML
  • Fields
  1. Resources

NetworkPolicy

PreviousMaterializedViewNextNetworkRule

Last updated 8 months ago

A Network Policy in Snowflake defines a set of network rules and IP addresses that are allowed or blocked from accessing a Snowflake account. This helps in managing network traffic and securing access based on network policies.

Examples

Python

network_policy = NetworkPolicy(
    name="some_network_policy",
    allowed_network_rule_list=[NetworkRule(name="rule1"), NetworkRule(name="rule2")],
    blocked_network_rule_list=[NetworkRule(name="rule3")],
    allowed_ip_list=["192.168.1.1", "192.168.1.2"],
    blocked_ip_list=["10.0.0.1"],
    comment="Example network policy"
)

YAML

network_policies:
  - name: some_network_policy
    allowed_network_rule_list:
      - rule1
      - rule2
    blocked_network_rule_list:
      - rule3
    allowed_ip_list: ["192.168.1.1", "192.168.1.2"]
    blocked_ip_list: ["10.0.0.1"]
    comment: "Example network policy"

Fields

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

  • allowed_network_rule_list (list) - A list of allowed network rules.

  • blocked_network_rule_list (list) - A list of blocked network rules.

  • allowed_ip_list (list) - A list of allowed IP addresses.

  • blocked_ip_list (list) - A list of blocked IP addresses.

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

owner (string or ) - The owner role of the network policy. Defaults to "SECURITYADMIN".

Snowflake Documentation
Role