Skip to main content

account_ip_access_lists

Creates, updates, deletes, gets or lists an account_ip_access_lists resource.

Overview​

Nameaccount_ip_access_lists
TypeResource
Iddatabricks_account.settings.account_ip_access_lists

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
list_idstringUniversally unique identifier (UUID) of the IP access list.
address_countintegerTotal number of IP or CIDR values.
created_atintegerCreation timestamp in milliseconds.
created_byintegerUser ID of the user who created this list.
enabledbooleanSpecifies whether this IP access list is enabled.
ip_addressesarray
labelstringLabel for the IP access list. This **cannot** be empty.
list_typestringType of IP access list. Valid values are as follows and are case-sensitive:<br /><br />- ``ALLOW``: An allow list. Include this IP or range.<br />- ``BLOCK``: A block list. Exclude this IP or range. IP addresses in the block list are excluded<br /> even if they are included in an allow list. (ALLOW, BLOCK)
updated_atintegerUpdate timestamp in milliseconds.
updated_byintegerUser ID of the user who updated this list.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
account_ip_access_lists_getselectaccount_id, ip_access_list_id, account_hostGets an IP access list, specified by its list ID.
account_ip_access_lists_listselectaccount_id, account_hostGets all IP access lists for the specified account.
account_ip_access_lists_createinsertaccount_id, account_host, label, list_typeCreates an IP access list for the account.
account_ip_access_lists_updateupdateaccount_id, ip_access_list_id, account_hostUpdates an existing IP access list, specified by its ID.
account_ip_access_lists_replacereplaceaccount_id, ip_access_list_id, account_host, label, list_type, enabledReplaces an IP access list, specified by its ID.
account_ip_access_lists_deletedeleteaccount_id, ip_access_list_id, account_hostDeletes an IP access list, specified by its list ID.

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_hoststringThe Databricks account console host. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws), or set explicitly with DATABRICKS_ACCOUNT_HOST (bare host, no scheme). (default: accounts.cloud.databricks.com, x-stackQL-envVar: DATABRICKS_ACCOUNT_HOST, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"accounts.cloud.databricks.com","azure":"accounts.azuredatabricks.net","gcp":"accounts.gcp.databricks.com"}})
account_idstring
ip_access_list_idstringThe ID for the corresponding IP access list

SELECT examples​

Gets an IP access list, specified by its list ID.

SELECT
list_id,
address_count,
created_at,
created_by,
enabled,
ip_addresses,
label,
list_type,
updated_at,
updated_by
FROM databricks_account.settings.account_ip_access_lists
WHERE account_id = '{{ account_id }}' -- required
AND ip_access_list_id = '{{ ip_access_list_id }}' -- required
AND account_host = '{{ account_host }}' -- required
;

INSERT examples​

Creates an IP access list for the account.

INSERT INTO databricks_account.settings.account_ip_access_lists (
label,
list_type,
ip_addresses,
account_id,
account_host
)
SELECT
'{{ label }}' /* required */,
'{{ list_type }}' /* required */,
'{{ ip_addresses }}',
'{{ account_id }}',
'{{ account_host }}'
RETURNING
ip_access_list
;

UPDATE examples​

Updates an existing IP access list, specified by its ID.

UPDATE databricks_account.settings.account_ip_access_lists
SET
enabled = {{ enabled }},
ip_addresses = '{{ ip_addresses }}',
label = '{{ label }}',
list_type = '{{ list_type }}'
WHERE
account_id = '{{ account_id }}' --required
AND ip_access_list_id = '{{ ip_access_list_id }}' --required
AND account_host = '{{ account_host }}' --required;

REPLACE examples​

Replaces an IP access list, specified by its ID.

REPLACE databricks_account.settings.account_ip_access_lists
SET
label = '{{ label }}',
list_type = '{{ list_type }}',
enabled = {{ enabled }},
ip_addresses = '{{ ip_addresses }}'
WHERE
account_id = '{{ account_id }}' --required
AND ip_access_list_id = '{{ ip_access_list_id }}' --required
AND account_host = '{{ account_host }}' --required
AND label = '{{ label }}' --required
AND list_type = '{{ list_type }}' --required
AND enabled = {{ enabled }} --required;

DELETE examples​

Deletes an IP access list, specified by its list ID.

DELETE FROM databricks_account.settings.account_ip_access_lists
WHERE account_id = '{{ account_id }}' --required
AND ip_access_list_id = '{{ ip_access_list_id }}' --required
AND account_host = '{{ account_host }}' --required
;