CREATE NETWORK POLICY
Overview
Creates a network policy that restricts access to the Lakehouse instance by IP allowlist and blocklist. Requires instance administrator (instance_admin) privileges.
Syntax
Parameters
<name>: The network policy name. Must be unique within the instance.ALLOWED_IP_LIST: IP allowlist. Supports IPv4 addresses or CIDR notation (e.g.192.168.1.0/24). An empty list means all IPs are allowed.0.0.0.0/0is not supported.BLOCKED_IP_LIST: IP blocklist. Optional. The blocklist takes priority over the allowlist; IPs matching the blocklist are always denied.
A newly created policy is active by default.
Examples
Notes
- All NETWORK POLICY operations require instance administrator (
instance_admin) privileges. - If you add your current access IP to the blocklist, your connection will be immediately dropped once the policy takes effect. Proceed with caution.
- When multiple policies are active simultaneously, the system takes the union of all active allowlists and the union of all active blocklists before applying them.
Related Documentation
- ALTER NETWORK POLICY — modify policy content or activate/deactivate
- DROP NETWORK POLICY — delete a policy
- SHOW NETWORK POLICY — list all policies
- DESC NETWORK POLICY — view policy details
- Network Policy — how it works and usage guide
