Skip to main content

network_policies

Creates, updates, deletes, gets or lists a network_policies resource.

Overview

Namenetwork_policies
TypeResource
Iddatabricks_account.settings.network_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstring
network_policy_idstringThe unique identifier for the network policy.
egressobjectThe network policies applying for egress traffic.
ingressobjectThe network policies applying for ingress traffic.
ingress_dry_runobjectThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_network_policy_rpcselectaccount_id, network_policy_idGets a network policy.
list_network_policies_rpcselectaccount_idpage_tokenGets an array of network policies.
create_network_policy_rpcinsertaccount_id, network_policyCreates a new network policy to manage which network destinations can be accessed from the Databricks
update_network_policy_rpcreplaceaccount_id, network_policy_id, network_policyUpdates a network policy. This allows you to modify the configuration of a network policy.
delete_network_policy_rpcdeleteaccount_id, network_policy_idDeletes 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.

NameDatatypeDescription
account_idstring
network_policy_idstringThe unique identifier of the network policy to delete.
page_tokenstringPagination token to go to next page based on previous query.

SELECT examples

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
;

INSERT examples

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
;

REPLACE examples

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

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
;