vw_network_policy_storage_destinations
Creates, updates, deletes, gets or lists a vw_network_policy_storage_destinations resource.
Overview
| Name | vw_network_policy_storage_destinations |
| Type | View |
| Id | databricks_account.settings.vw_network_policy_storage_destinations |
Fields
The following fields are returned by this view:
| Name | Datatype | Description |
|---|---|---|
account_id | string | Databricks account ID used to scope the query. |
network_policy_id | string | Unique identifier for the network policy. |
restriction_mode | string | Overall egress restriction mode for the policy (e.g. FULL_RESTRICTION, NO_RESTRICTION). |
enforcement_mode | string | Enforcement mode for the egress policy (e.g. ENFORCED, AUDIT). |
storage_type | string | Cloud storage type for this allowed destination (one row per destination, e.g. AWS_S3, AZURE_STORAGE). |
bucket_name | string | Name of the allowed S3 bucket (AWS only). |
region | string | Cloud region of the allowed storage destination (AWS only). |
azure_storage_account | string | Name of the allowed Azure storage account (Azure only). |
azure_storage_service | string | Azure storage service type for this destination (e.g. blob, dfs) (Azure only). |
Required Parameters
The following parameters are required by this view:
| Name | Datatype | Description |
|---|---|---|
account_id | string | Databricks account ID used to scope the query. |
SELECT Examples
SELECT
account_id,
network_policy_id,
restriction_mode,
enforcement_mode,
storage_type,
bucket_name,
region,
azure_storage_account,
azure_storage_service
FROM databricks_account.settings.vw_network_policy_storage_destinations
WHERE account_id = '{{ account_id }}';
SQL Definition
- Sqlite3
- Postgres
SELECT
np.account_id,
np.network_policy_id,
JSON_EXTRACT(np.egress, '$.network_access.restriction_mode') AS restriction_mode,
JSON_EXTRACT(np.egress, '$.network_access.policy_enforcement.enforcement_mode') AS enforcement_mode,
JSON_EXTRACT(d.value, '$.storage_destination_type') AS storage_type,
JSON_EXTRACT(d.value, '$.bucket_name') AS bucket_name,
JSON_EXTRACT(d.value, '$.region') AS region,
JSON_EXTRACT(d.value, '$.azure_storage_account') AS azure_storage_account,
JSON_EXTRACT(d.value, '$.azure_storage_service') AS azure_storage_service
FROM databricks_account.settings.network_policies np,
JSON_EACH(JSON_EXTRACT(np.egress, '$.network_access.allowed_storage_destinations')) d
WHERE account_id = '{{ account_id }}'
SELECT
np.account_id,
np.network_policy_id,
np.egress->'network_access'->>'restriction_mode' AS restriction_mode,
np.egress->'network_access'->'policy_enforcement'->>'enforcement_mode' AS enforcement_mode,
d.value->>'storage_destination_type' AS storage_type,
d.value->>'bucket_name' AS bucket_name,
d.value->>'region' AS region,
d.value->>'azure_storage_account' AS azure_storage_account,
d.value->>'azure_storage_service' AS azure_storage_service
FROM databricks_account.settings.network_policies np,
jsonb_array_elements((np.egress->'network_access'->'allowed_storage_destinations')::jsonb) AS d
WHERE account_id = '{{ account_id }}'