network_policies
Creates, updates, deletes, gets or lists a network_policies resource.
Overview
| Name | network_policies |
| Type | Resource |
| Id | databricks_account.settings.network_policies |
Fields
The following fields are returned by SELECT queries:
- get_network_policy_rpc
- list_network_policies_rpc
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
network_policy_id | string | The unique identifier for the network policy. |
egress | object | The network policies applying for egress traffic. |
ingress | object | The network policies applying for ingress traffic. |
ingress_dry_run | object | The ingress policy for dry run mode. Dry run will always run even if the request is allowed by the ingress policy. When this field is set, the policy will be evaluated and emit logs only without blocking requests. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
network_policy_id | string | The unique identifier for the network policy. |
egress | object | The network policies applying for egress traffic. |
ingress | object | The network policies applying for ingress traffic. |
ingress_dry_run | object | The ingress policy for dry run mode. Dry run will always run even if the request is allowed by the ingress policy. When this field is set, the policy will be evaluated and emit logs only without blocking requests. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_network_policy_rpc | select | account_id, network_policy_id | Gets a network policy. | |
list_network_policies_rpc | select | account_id | page_token | Gets an array of network policies. |
create_network_policy_rpc | insert | account_id, network_policy | Creates a new network policy to manage which network destinations can be accessed from the Databricks | |
update_network_policy_rpc | replace | account_id, network_policy_id, network_policy | Updates a network policy. This allows you to modify the configuration of a network policy. | |
delete_network_policy_rpc | delete | account_id, network_policy_id | Deletes a network policy. Cannot be called on 'default-policy'. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
network_policy_id | string | The unique identifier of the network policy to delete. |
page_token | string | Pagination token to go to next page based on previous query. |
SELECT examples
- get_network_policy_rpc
- list_network_policies_rpc
Gets a network policy.
SELECT
account_id,
network_policy_id,
egress,
ingress,
ingress_dry_run
FROM databricks_account.settings.network_policies
WHERE account_id = '{{ account_id }}' -- required
AND network_policy_id = '{{ network_policy_id }}' -- required
;
Gets an array of network policies.
SELECT
account_id,
network_policy_id,
egress,
ingress,
ingress_dry_run
FROM databricks_account.settings.network_policies
WHERE account_id = '{{ account_id }}' -- required
AND page_token = '{{ page_token }}'
;
INSERT examples
- create_network_policy_rpc
- Manifest
Creates a new network policy to manage which network destinations can be accessed from the Databricks
INSERT INTO databricks_account.settings.network_policies (
network_policy,
account_id
)
SELECT
'{{ network_policy }}' /* required */,
'{{ account_id }}'
RETURNING
account_id,
network_policy_id,
egress,
ingress,
ingress_dry_run
;
# Description fields are for documentation purposes
- name: network_policies
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the network_policies resource.
- name: network_policy
description: |
Network policy configuration details.
value:
account_id: "{{ account_id }}"
egress:
network_access:
restriction_mode: "{{ restriction_mode }}"
allowed_databricks_destinations:
- workspace_ids: "{{ workspace_ids }}"
allowed_internet_destinations:
- destination: "{{ destination }}"
internet_destination_type: "{{ internet_destination_type }}"
allowed_storage_destinations:
- azure_storage_account: "{{ azure_storage_account }}"
azure_storage_service: "{{ azure_storage_service }}"
bucket_name: "{{ bucket_name }}"
region: "{{ region }}"
storage_destination_type: "{{ storage_destination_type }}"
blocked_internet_destinations:
- destination: "{{ destination }}"
internet_destination_type: "{{ internet_destination_type }}"
policy_enforcement:
dry_run_mode_product_filter:
- "{{ dry_run_mode_product_filter }}"
enforcement_mode: "{{ enforcement_mode }}"
ingress:
cross_workspace_access:
restriction_mode: "{{ restriction_mode }}"
allow_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_source_workspaces: {{ all_source_workspaces }}
selected_workspaces: "{{ selected_workspaces }}"
deny_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_source_workspaces: {{ all_source_workspaces }}
selected_workspaces: "{{ selected_workspaces }}"
private_access:
restriction_mode: "{{ restriction_mode }}"
allow_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_private_access: {{ all_private_access }}
all_registered_endpoints: {{ all_registered_endpoints }}
azure_workspace_private_link: {{ azure_workspace_private_link }}
endpoints: "{{ endpoints }}"
deny_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_private_access: {{ all_private_access }}
all_registered_endpoints: {{ all_registered_endpoints }}
azure_workspace_private_link: {{ azure_workspace_private_link }}
endpoints: "{{ endpoints }}"
public_access:
restriction_mode: "{{ restriction_mode }}"
allow_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_ip_ranges: {{ all_ip_ranges }}
excluded_ip_ranges: "{{ excluded_ip_ranges }}"
included_ip_ranges: "{{ included_ip_ranges }}"
managed_ip_range: "{{ managed_ip_range }}"
deny_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_ip_ranges: {{ all_ip_ranges }}
excluded_ip_ranges: "{{ excluded_ip_ranges }}"
included_ip_ranges: "{{ included_ip_ranges }}"
managed_ip_range: "{{ managed_ip_range }}"
ingress_dry_run:
cross_workspace_access:
restriction_mode: "{{ restriction_mode }}"
allow_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_source_workspaces: {{ all_source_workspaces }}
selected_workspaces: "{{ selected_workspaces }}"
deny_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_source_workspaces: {{ all_source_workspaces }}
selected_workspaces: "{{ selected_workspaces }}"
private_access:
restriction_mode: "{{ restriction_mode }}"
allow_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_private_access: {{ all_private_access }}
all_registered_endpoints: {{ all_registered_endpoints }}
azure_workspace_private_link: {{ azure_workspace_private_link }}
endpoints: "{{ endpoints }}"
deny_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_private_access: {{ all_private_access }}
all_registered_endpoints: {{ all_registered_endpoints }}
azure_workspace_private_link: {{ azure_workspace_private_link }}
endpoints: "{{ endpoints }}"
public_access:
restriction_mode: "{{ restriction_mode }}"
allow_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_ip_ranges: {{ all_ip_ranges }}
excluded_ip_ranges: "{{ excluded_ip_ranges }}"
included_ip_ranges: "{{ included_ip_ranges }}"
managed_ip_range: "{{ managed_ip_range }}"
deny_rules:
- authentication:
identities: "{{ identities }}"
identity_type: "{{ identity_type }}"
destination:
account_api: "{{ account_api }}"
account_databricks_one: "{{ account_databricks_one }}"
account_ui: "{{ account_ui }}"
all_destinations: {{ all_destinations }}
apps_runtime: "{{ apps_runtime }}"
lakebase_runtime: "{{ lakebase_runtime }}"
workspace_api: "{{ workspace_api }}"
workspace_ui: "{{ workspace_ui }}"
label: "{{ label }}"
origin:
all_ip_ranges: {{ all_ip_ranges }}
excluded_ip_ranges: "{{ excluded_ip_ranges }}"
included_ip_ranges: "{{ included_ip_ranges }}"
managed_ip_range: "{{ managed_ip_range }}"
network_policy_id: "{{ network_policy_id }}"
REPLACE examples
- update_network_policy_rpc
Updates a network policy. This allows you to modify the configuration of a network policy.
REPLACE databricks_account.settings.network_policies
SET
network_policy = '{{ network_policy }}'
WHERE
account_id = '{{ account_id }}' --required
AND network_policy_id = '{{ network_policy_id }}' --required
AND network_policy = '{{ network_policy }}' --required
RETURNING
account_id,
network_policy_id,
egress,
ingress,
ingress_dry_run;
DELETE examples
- delete_network_policy_rpc
Deletes a network policy. Cannot be called on 'default-policy'.
DELETE FROM databricks_account.settings.network_policies
WHERE account_id = '{{ account_id }}' --required
AND network_policy_id = '{{ network_policy_id }}' --required
;