ALTER NETWORK POLICY
Reference and syntax for the ALTER NETWORK POLICY command.
ALTER NETWORK POLICY SET/ADD/REMOVE
Updates the configuration of the existing network policy by specifying its name, a list of internet protocol (IP) addresses to allow or block, and an optional description.
For more information, see Network policies.
Syntax
Parameters
Parameter | Description |
---|---|
<network_policy_name> | The name of the network policy to edit. |
<allowed_ip> | A comma-separated and quoted list of IP addresses to allow in the specified network policy. |
<blocked_ip> | A comma-separated and quoted list of IP addresses to block in the specified network policy. |
<description> | (Optional) A description for the specified network policy. |
Examples
Example
The following code example modifies the existing network policy ‘my_network_policy’ by replacing its allowed and blocked IP lists with specified values and an updating its description:
Example
The following code example adds an IP address 192.168.5.1
to the allowed list of the existing network policy my_network_policy
:
Example
The following code example removes the IP address 6.7.8.9
from the blocked list of the network policy my_network_policy
:
ALTER NETWORK POLICY RENAME TO
Renames a network policy.
Syntax
Parameters
Parameter | Description |
---|---|
<network_policy_name> | The name of the network policy to rename. |
<new_network_policy_name> | The new name of the network policy. |
Example
The following command will rename the “office” network policy to “office_branch_1”.
ALTER NETWORK POLICY OWNER TO
Changes the owner of a network policy.
You can view the current owner in the network_policy_owner
column of the information_schema.network_policies
view.
For more information, see ownership.
Syntax
Parameters
Parameter | Description |
---|---|
<network_policy_name> | The name of the network policy to change the owner of. |
<identity> | The new owner of the network policy, which can be the name of another login or service account. |
Example
The following command will set network policy “my_policy” owner to “alice@acme.com”.