ALTER NETWORK POLICY
Overview
Modifies the IP allowlist or blocklist of a network policy, or toggles the policy between active and inactive states. Requires instance administrator (instance_admin) privileges.
Syntax
Parameters
<name>: The name of the network policy to modify.IF EXISTS: Silently skips the operation if the policy does not exist, without returning an error.SET ALLOWED_IP_LIST: Overwrites the allowlist with new values. An empty list means all IPs are allowed.BLOCKED_IP_LIST: Overwrites the blocklist with new values. Optional. If omitted, the blocklist is cleared.ACTIVATE: Sets the policy status to active; the policy takes effect immediately.INACTIVATE: Sets the policy status to inactive; the policy no longer takes effect.
Examples
Notes
- All NETWORK POLICY operations require instance administrator (
instance_admin) privileges. - The policy name cannot be changed via ALTER.
- Deactivating a policy does not delete it; it can be reactivated at any time.
Related Documentation
- CREATE NETWORK POLICY — create a policy
- DROP NETWORK POLICY — delete a policy
- DESC NETWORK POLICY — view the current IP lists of a policy
- Network Policy — how it works and usage guide
