account network-policies command group
This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.
Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.
The account network-policies command group within the Databricks CLI contains commands to manage network policies for your account. Network policies control which network destinations can be accessed from the Databricks environment. See Manage network policies for serverless egress control.
databricks account network-policies create-network-policy-rpc
Create a new network policy to manage which network destinations can be accessed from the Databricks environment.
databricks account network-policies create-network-policy-rpc [flags]
Options
--account-id string
The associated account ID for this network policy object.
--network-policy-id string
The unique identifier for the network policy.
--json JSON
The inline JSON string or the @path to the JSON file with the request body
Examples
The following example creates a network policy using JSON:
databricks account network-policies create-network-policy-rpc --json '{"network_policy_id": "my-network-policy", "name": "My Network Policy", "rules": [{"action": "ALLOW", "destination": "0.0.0.0/0"}]}'
The following example creates a network policy using a JSON file:
databricks account network-policies create-network-policy-rpc --json @network-policy.json
The following example creates a network policy with command-line flags:
databricks account network-policies create-network-policy-rpc --account-id "account-123" --network-policy-id "my-network-policy" --json @network-policy.json
databricks account network-policies delete-network-policy-rpc
Delete a network policy. Cannot be called on default-policy.
databricks account network-policies delete-network-policy-rpc NETWORK_POLICY_ID [flags]
Arguments
NETWORK_POLICY_ID
The unique identifier of the network policy to delete.
Options
Examples
The following example deletes a network policy by ID:
databricks account network-policies delete-network-policy-rpc my-network-policy
databricks account network-policies get-network-policy-rpc
Get a network policy.
databricks account network-policies get-network-policy-rpc NETWORK_POLICY_ID [flags]
Arguments
NETWORK_POLICY_ID
The unique identifier of the network policy to retrieve.
Options
Examples
The following example gets a network policy by ID:
databricks account network-policies get-network-policy-rpc my-network-policy
The following example gets the default network policy:
databricks account network-policies get-network-policy-rpc default-policy
databricks account network-policies list-network-policies-rpc
Get an array of network policies.
databricks account network-policies list-network-policies-rpc [flags]
Options
--page-token string
Pagination token to go to next page based on previous query.
Examples
The following example lists all network policies:
databricks account network-policies list-network-policies-rpc
The following example lists network policies with pagination:
databricks account network-policies list-network-policies-rpc --page-token "next_page_token"
databricks account network-policies update-network-policy-rpc
Update a network policy. This allows you to modify the configuration of a network policy.
databricks account network-policies update-network-policy-rpc NETWORK_POLICY_ID [flags]
Arguments
NETWORK_POLICY_ID
The unique identifier for the network policy.
Options
--account-id string
The associated account ID for this network policy object.
--network-policy-id string
The unique identifier for the network policy.
--json JSON
The inline JSON string or the @path to the JSON file with the request body
Examples
The following example updates a network policy using JSON:
databricks account network-policies update-network-policy-rpc my-network-policy --json '{"name": "Updated Network Policy", "rules": [{"action": "ALLOW", "destination": "10.0.0.0/8"}]}'
The following example updates a network policy using a JSON file:
databricks account network-policies update-network-policy-rpc my-network-policy --json @update-network-policy.json
The following example updates the default network policy:
databricks account network-policies update-network-policy-rpc default-policy --json @default-policy-rules.json
Global flags
--debug
Whether to enable debug logging.
-h or --help
Display help for the Databricks CLI or the related command group or the related command.
--log-file string
A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.
--log-format format
The log format type, text or json. The default value is text.
--log-level string
A string representing the log format level. If not specified then the log format level is disabled.
-o, --output type
The command output type, text or json. The default value is text.
-p, --profile string
The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.
--progress-format format
The format to display progress logs: default, append, inplace, or json
-t, --target string
If applicable, the bundle target to use