Skip to main content

vw_network_policy_storage_destinations

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

Overview

Namevw_network_policy_storage_destinations
TypeView
Iddatabricks_account.settings.vw_network_policy_storage_destinations

Fields

The following fields are returned by this view:

NameDatatypeDescription
account_idstringDatabricks account ID used to scope the query.
network_policy_idstringUnique identifier for the network policy.
restriction_modestringOverall egress restriction mode for the policy (e.g. FULL_RESTRICTION, NO_RESTRICTION).
enforcement_modestringEnforcement mode for the egress policy (e.g. ENFORCED, AUDIT).
storage_typestringCloud storage type for this allowed destination (one row per destination, e.g. AWS_S3, AZURE_STORAGE).
bucket_namestringName of the allowed S3 bucket (AWS only).
regionstringCloud region of the allowed storage destination (AWS only).
azure_storage_accountstringName of the allowed Azure storage account (Azure only).
azure_storage_servicestringAzure storage service type for this destination (e.g. blob, dfs) (Azure only).

Required Parameters

The following parameters are required by this view:

NameDatatypeDescription
account_idstringDatabricks 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

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 }}'